Add token for post ressource
This commit is contained in:
parent
0f63c18b4d
commit
94721a6742
@ -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();
|
||||||
|
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user