mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-29 02:22:28 +00:00
Fix ci clearing users not clearing auth
This commit is contained in:
parent
2145df0dfb
commit
2f334b5f9f
@ -89,8 +89,21 @@ func List(pageInfo model.PageInfo, filters []model.Filter, expand []string) (ent
|
||||
// DeleteAll will do just that, and should only be used for testing purposes.
|
||||
func DeleteAll() error {
|
||||
db := database.GetDB()
|
||||
result := db.Exec(fmt.Sprintf(`DELETE FROM %s WHERE is_system = ?`, database.QuoteTableName("user")), false)
|
||||
if result := db.Exec(
|
||||
fmt.Sprintf(`DELETE FROM %s WHERE is_system = ?`, database.QuoteTableName("user")),
|
||||
false,
|
||||
); result.Error != nil {
|
||||
return result.Error
|
||||
}
|
||||
|
||||
if result := db.Exec(
|
||||
fmt.Sprintf(`DELETE FROM %s`, database.QuoteTableName("auth")),
|
||||
false,
|
||||
); result.Error != nil {
|
||||
return result.Error
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetCapabilities gets capabilities for a user
|
||||
|
Loading…
x
Reference in New Issue
Block a user