feat (auth): rework logout
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/google/uuid"
|
||||
dg "github.com/karincake/apem/db-gorm-mysql"
|
||||
dg "github.com/karincake/apem/db-gorm-pg"
|
||||
d "github.com/karincake/dodol"
|
||||
l "github.com/karincake/lepet"
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package authentication
|
||||
|
||||
import (
|
||||
dg "github.com/karincake/apem/db-gorm-mysql"
|
||||
dg "github.com/karincake/apem/db-gorm-pg"
|
||||
)
|
||||
|
||||
// just return the error code
|
||||
func GetAndCheck(input, condition any) (eCode string) {
|
||||
result := dg.I.Where(condition).Find(input)
|
||||
result := dg.I.Where(condition).Find(&input)
|
||||
if result.Error != nil {
|
||||
return "fetch-fail"
|
||||
} else if result.RowsAffected == 0 {
|
||||
|
||||
Reference in New Issue
Block a user