Skip to content

Commit

Permalink
[NU-1231] Rewrite process actvity endpoints from akka to tapir (#5389)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-bigorajski committed Feb 7, 2024
1 parent c892b34 commit f2c2bd9
Show file tree
Hide file tree
Showing 26 changed files with 1,132 additions and 259 deletions.
7 changes: 3 additions & 4 deletions designer/client/src/http/HttpService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,10 @@ class HttpService {
}

addAttachment(processName: ProcessName, versionId: ProcessVersionId, file: File) {
const data = new FormData();
data.append("attachment", file);

return api
.post(`/processes/${encodeURIComponent(processName)}/${versionId}/activity/attachments`, data)
.post(`/processes/${encodeURIComponent(processName)}/${versionId}/activity/attachments`, file, {
headers: { "Content-Disposition": `attachment; filename="${file.name}"` },
})
.then(() => this.#addInfo(i18next.t("notification.error.attachmentAdded", "Attachment added")))
.catch((error) =>
this.#addError(i18next.t("notification.error.failedToAddAttachment", "Failed to add attachment"), error, true),
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait ProcessDirectives extends NuPathMatchers {
}

def processId(processName: ProcessName): Directive1[ProcessIdWithName] = {
onSuccess(processService.getProcessId(processName))
onSuccess(processService.getProcessIdUnsafe(processName))
.map(ProcessIdWithName(_, processName))
.flatMap(provide)
}
Expand Down

0 comments on commit f2c2bd9

Please sign in to comment.