Merge pull request 'main' (#506) from main into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/506
This commit is contained in:
chenhao 2024-05-25 13:15:16 +08:00
commit 1ac088da88
1 changed files with 2 additions and 2 deletions

View File

@ -1099,7 +1099,7 @@ func (m *Mongo) DeleteToken(ctx *gin.Context, id int64) error {
func (m *Mongo) DeleteTokenByMid(ctx *gin.Context, mid int64) error {
col := m.getColToken()
err := col.Remove(ctx, qmgo.M{
_, err := col.RemoveAll(ctx, qmgo.M{
"mid": mid,
})
return err
@ -1108,7 +1108,7 @@ func (m *Mongo) DeleteTokenByMid(ctx *gin.Context, mid int64) error {
func (m *Mongo) DeleteTokenByMids(ctx *gin.Context, mids []int64) error {
col := m.getColToken()
err := col.Remove(ctx, qmgo.M{
_, err := col.RemoveAll(ctx, qmgo.M{
"mid": qmgo.M{
"$in": mids,
},