diff --git a/controllers/core/auth_token.py b/controllers/core/auth_token.py index 1307ca9..cae0548 100644 --- a/controllers/core/auth_token.py +++ b/controllers/core/auth_token.py @@ -155,7 +155,8 @@ class AuthTokenController(BaseModel): } }, projection = { - "_id": True + "_id": True, + "key": True }, upsert = True, return_updated = True @@ -182,7 +183,7 @@ class AuthTokenController(BaseModel): ) # Done here: - return auth_token.key if mongo_json and db_json.get("status") == 1 else None + return mongo_json["key"] if mongo_json and db_json.get("status") == 1 else None async def set_token( self, diff --git a/to_git.sh b/to_git.sh index aee3cbc..907927d 100644 --- a/to_git.sh +++ b/to_git.sh @@ -17,5 +17,7 @@ git commit -m "$COMMENT" echo "Commit done." # Push th commit to git: -git push -u https://wtt.ditscentre.in/ditscentre/api_utils_converse_v2.git master +echo "Branch : " +read -r BRANCH +git push -u https://wtt.ditscentre.in/ditscentre/api_utils_converse_v2.git "$BRANCH" echo "Attempt done. Exiting." \ No newline at end of file