계정 collection 추가

This commit is contained in:
2023-06-20 12:02:29 +09:00
parent efcc847405
commit 8d9b975234
3 changed files with 3 additions and 121 deletions

View File

@ -370,7 +370,7 @@ func (sh *serviceDescription) link(w http.ResponseWriter, r *http.Request) {
return
}
_, newid, err := sh.mongoClient.Update(CollectionService, bson.M{
_, newid, err := sh.mongoClient.Update(CollectionAccount, bson.M{
"_id": link["_id"].(primitive.ObjectID),
}, bson.M{
"$setOnInsert": bson.M{
@ -479,7 +479,7 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
for i := 0; i < len(sh.serviceCodeBytes); i++ {
newaccid[i] ^= sh.serviceCodeBytes[i]
}
account, err := sh.mongoClient.FindOneAndUpdate(CollectionService, bson.M{
account, err := sh.mongoClient.FindOneAndUpdate(CollectionAccount, bson.M{
"_id": linkid,
}, bson.M{
"$setOnInsert": bson.M{