File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,21 @@ async def get_team_containers(response: Response, jwt: RequireJwt):
122
122
return result
123
123
124
124
@atomic ()
125
- @router .post ("team/{id}" )
125
+ @router .post ("/ team/{id}" )
126
126
async def upsert_table_tn (id : int , data : TableTNBody , request : Request , response : Response ):
127
127
admin_password = (await request .body ()).strip ()
128
128
129
129
if not bcrypt .verify (admin_password , ADMIN_HASH ):
130
- response .status_code = 401
130
+ response .status_code = 401
131
+
132
+ team = await Team .get_or_none (id = id )
133
+ if not team :
134
+ response .status_code = 404
135
+
136
+ try :
137
+ team .table_tn = data .table_tn
138
+ await team .save ()
139
+ except Exception :
140
+ response .status_code = 500
141
+
142
+ return {"msg_code" : "tabletn_upserted" }
You can’t perform that action at this time.
0 commit comments