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)
//request.headers.addEntries(newEntries)
ManagerAppContext managerAppContext = appContext.getContext();
print(managerAppContext.token.accessToken);
request.headers["authorization"]="Bearer ${managerAppContext.token.accessToken}";
request.fields['label'] = resourceDetailDTO.label;
request.fields['type'] = ResourceType.image.toString();

View File

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