Add token for post ressource

This commit is contained in:
Thomas Fransolet 2021-06-19 14:40:54 +02:00
parent 0f63c18b4d
commit 94721a6742
2 changed files with 5 additions and 3 deletions

View File

@ -115,9 +115,9 @@ void create(ResourceDetailDTO resourceDetailDTO, File file, AppContext appContex
) )
); );
// Todo Add header with bearer token (get via managercontext - token value) ManagerAppContext managerAppContext = appContext.getContext();
//request.headers.addEntries(newEntries) print(managerAppContext.token.accessToken);
request.headers["authorization"]="Bearer ${managerAppContext.token.accessToken}";
request.fields['label'] = resourceDetailDTO.label; request.fields['label'] = resourceDetailDTO.label;
request.fields['type'] = ResourceType.image.toString(); request.fields['type'] = ResourceType.image.toString();

View File

@ -589,6 +589,8 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
/api/Section: /api/Section:
get: get:
tags: tags: