Commit 3ee42b8d authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

fix: 1590 error 500 when reject deposit

parent dfd0d591
......@@ -207,7 +207,7 @@ export class DepositState extends ResourceLogoState<DepositStateModel, Deposit>
private readonly _ZIP_EXTENSION: string = ".zip";
private readonly _DEPOSIT_FILE_DOWNLOAD_PREFIX: string = "deposit_";
private readonly _FOLDER_QUERY_PARAM: string = "folder";
private readonly _DEPOSIT_REJECT_MESSAGE: string = "message";
private readonly _DEPOSIT_REJECT_REASON: string = "reason";
constructor(protected apiService: ApiService,
protected store: Store,
......@@ -485,7 +485,7 @@ export class DepositState extends ResourceLogoState<DepositStateModel, Deposit>
@Action(DepositAction.Reject)
reject(ctx: StateContext<DepositStateModel>, action: DepositAction.Reject): Observable<Result> {
return this.apiService.post<Result>(`${this._urlResource + urlSeparator + action.deposit.resId + urlSeparator + ApiActionEnum.REJECT}?${this._DEPOSIT_REJECT_MESSAGE}=${action.message}`)
return this.apiService.post<Result>(`${this._urlResource + urlSeparator + action.deposit.resId + urlSeparator + ApiActionEnum.REJECT}?${this._DEPOSIT_REJECT_REASON}=${action.message}`)
.pipe(
tap(deposit => ctx.dispatch(new DepositAction.RejectSuccess(deposit))),
catchError(error => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment