Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Extract delete logic endpoint #1586

Merged
merged 30 commits into from
Apr 21, 2021
Merged

refactor: Extract delete logic endpoint #1586

merged 30 commits into from
Apr 21, 2021

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Apr 8, 2021

Problem

Closes #1490

Tests

  • Create a form with single logic.
    • Check that delete logic works on admin view Logic Tab. The network call should return 200.
    • Repeat the above with multiple logic. Check that only one logic is deleted.
  • Test using manual API calls
    • Check that new delete endpoint DELETE /forms/:formId/logic/:logicId returns 200 when formId and logicId are correct and that the specific logicId is deleted from db
    • Check that endpoint returns 404 when formId or logicId are incorrect

@tshuli tshuli requested a review from karrui April 8, 2021 03:08
@karrui karrui requested a review from mantariksh April 8, 2021 05:37
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some changes~

src/app/modules/form/admin-form/admin-form.service.ts Outdated Show resolved Hide resolved
src/app/modules/form/admin-form/admin-form.service.ts Outdated Show resolved Hide resolved
src/app/modules/form/admin-form/admin-form.service.ts Outdated Show resolved Hide resolved
src/app/modules/form/form.errors.ts Outdated Show resolved Hide resolved
@tshuli
Copy link
Contributor Author

tshuli commented Apr 14, 2021

@karrui thanks for reviewing, for re-review please

@tshuli tshuli requested a review from karrui April 14, 2021 08:43
@tshuli
Copy link
Contributor Author

tshuli commented Apr 15, 2021

@karrui thanks for reviewing, for re-review pls

@tshuli tshuli requested a review from karrui April 15, 2021 02:55
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some more changes;

will the changes to make client use this endpoint will be in a separate PR or was it just missed?

src/app/modules/form/admin-form/admin-form.service.ts Outdated Show resolved Hide resolved
@tshuli
Copy link
Contributor Author

tshuli commented Apr 15, 2021

@karrui simplified the return; frontend changes will come in separate PR

@tshuli tshuli requested a review from karrui April 15, 2021 03:19
@tshuli
Copy link
Contributor Author

tshuli commented Apr 19, 2021

@karrui actually I added on the frontend changes, for review pls

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some changes on the frontend handling requested, lgtm otherwise

@tshuli tshuli force-pushed the ref/delete-api branch 2 times, most recently from ac7b7e7 to 8119709 Compare April 19, 2021 07:59
@tshuli tshuli requested a review from karrui April 19, 2021 08:00
src/app/models/form.server.model.ts Outdated Show resolved Hide resolved
src/app/modules/form/admin-form/admin-form.service.ts Outdated Show resolved Hide resolved
src/types/form.ts Outdated Show resolved Hide resolved
src/app/models/form.server.model.ts Show resolved Hide resolved
@tshuli
Copy link
Contributor Author

tshuli commented Apr 20, 2021

@mantariksh thanks for reviewing, for re-review pls

@tshuli tshuli requested a review from mantariksh April 20, 2021 03:58
@tshuli
Copy link
Contributor Author

tshuli commented Apr 21, 2021

@mantariksh thanks for reviewing, for re-review pls

@tshuli tshuli requested a review from mantariksh April 21, 2021 01:51
@tshuli tshuli merged commit ea97e78 into develop Apr 21, 2021
@liangyuanruo liangyuanruo deleted the ref/delete-api branch May 4, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] Extract delete logic endpoint from PUT /:formId/adminform
3 participants