Expose AddRaw[User|News] for scripting

This commit is contained in:
Las Zenow 2017-05-21 22:48:43 +00:00
parent d0670c0b62
commit 83ab1b461d
4 changed files with 17 additions and 4 deletions

View file

@ -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,