fixed bugs
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"git.acooldomain.co/server-manager/backend/models"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
)
|
||||
|
||||
type ServerPermissions struct {
|
||||
@@ -65,9 +66,12 @@ func (self *ServersAuthorizationDbHandler) AddPermissions(ctx context.Context, u
|
||||
"server_id": serverId,
|
||||
},
|
||||
bson.M{"$set": bson.M{
|
||||
"username": username,
|
||||
"server_id": serverId,
|
||||
"permissions": newPermissions,
|
||||
},
|
||||
},
|
||||
options.Update().SetUpsert(true),
|
||||
)
|
||||
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user