Expose AddRaw[User|News] for scripting
This commit is contained in:
parent
d0670c0b62
commit
83ab1b461d
4 changed files with 17 additions and 4 deletions
|
@ -36,10 +36,10 @@ func (db *pgDB) AddUser(name string, pass string) error {
|
|||
log.Error("Error hashing password: ", err)
|
||||
return errors.New("An error happen storing the password")
|
||||
}
|
||||
return db.addRawUser(name, hpass, salt, "")
|
||||
return db.AddRawUser(name, hpass, salt, "")
|
||||
}
|
||||
|
||||
func (db *pgDB) addRawUser(name string, hpass []byte, salt []byte, role string) error {
|
||||
func (db *pgDB) AddRawUser(name string, hpass []byte, salt []byte, role string) error {
|
||||
u := user{
|
||||
Username: name,
|
||||
Password: hpass,
|
||||
|
|
Reference in a new issue