feat: some add auth
This commit is contained in:
		| @@ -40,8 +40,10 @@ app | ||||
| const add = app.route({ | ||||
|   path: 'container', | ||||
|   key: 'update', | ||||
|   middleware: ['auth'], | ||||
| }); | ||||
| add.run = async (ctx) => { | ||||
|   const tokenUser = ctx.state.tokenUser; | ||||
|   const data = ctx.query.data; | ||||
|  | ||||
|   const _data: Container = { | ||||
| @@ -72,6 +74,7 @@ add.run = async (ctx) => { | ||||
|         ...container, | ||||
|         source: '', | ||||
|         sourceType: '', | ||||
|         uid: tokenUser.id, | ||||
|       }); | ||||
|     } catch (e) { | ||||
|       console.log('error', e); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user