[GH-10800] convert bot account to user account (#10803)

* [10800] convert bot account to user account

* check password validity first

* review comments
Этот коммит содержится в:
Siyuan Liu
2019-05-15 05:23:12 -07:00
коммит произвёл Miguel de la Cruz
родитель a68ad55151
Коммит 2130e9f0b1
4 изменённых файлов: 223 добавлений и 18 удалений

Просмотреть файл

@@ -233,12 +233,6 @@ func (us SqlBotStore) Update(bot *model.Bot) store.StoreChannel {
// If the corresponding user is to be deleted, it must be done via the user store.
func (us SqlBotStore) PermanentDelete(botUserId string) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
userResult := <-us.User().PermanentDelete(botUserId)
if userResult.Err != nil {
result.Err = userResult.Err
return
}
if _, err := us.GetMaster().Exec(`
DELETE FROM
Bots