Skip to content

Commit

Permalink
Merge pull request #2268 from Josephalexantony-aot/Feature/FWF-3739-S…
Browse files Browse the repository at this point in the history
…ave-and-Publish

FWF-3739: [Feature] - Save and Publish Layout
  • Loading branch information
arun-s-aot authored Oct 15, 2024
2 parents c024a83 + f832a57 commit 3ecf5ae
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 129 deletions.
2 changes: 2 additions & 0 deletions forms-flow-web/src/apiManager/endpoints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const API = {
FORM: `${WEB_BASE_URL}/form`,
FORM_DESIGN: `${WEB_BASE_URL}/form/form-design`,
FORM_IMPORT: `${WEB_BASE_URL}/import`,
PUBLISH: `${WEB_BASE_URL}/form/<mapper_id>/publish`,
UN_PUBLISH: `${WEB_BASE_URL}/form/<mapper_id>/unpublish`,
FORM_HISTORY: `${WEB_BASE_URL}/form/form-history`,
LANG_UPDATE: `${WEB_BASE_URL}/user/locale`,
FORM_PROCESSES: `${WEB_BASE_URL}/form/formid`,
Expand Down
10 changes: 10 additions & 0 deletions forms-flow-web/src/apiManager/services/FormServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ export const formCreate = (formData) => {
return RequestService.httpPOSTRequest(API.FORM_DESIGN, formData);
};

export const publish = (mapperId) => {
const publishUrl = replaceUrl(API.PUBLISH, "<mapper_id>", mapperId);
return RequestService.httpPOSTRequest(publishUrl);
};

export const unPublish = (mapperId) => {
const unPublishUrl = replaceUrl(API.UN_PUBLISH, "<mapper_id>", mapperId);
return RequestService.httpPOSTRequest(unPublishUrl);
};

export const formImport = (importData, data) => {
return RequestService.httpMultipartPOSTRequest(API.FORM_IMPORT, importData, data);
};
Expand Down
Loading

0 comments on commit 3ecf5ae

Please sign in to comment.