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

feat(apiv6): implemented closeChangeset #12

Merged
merged 6 commits into from
Dec 3, 2020
Merged

feat(apiv6): implemented closeChangeset #12

merged 6 commits into from
Dec 3, 2020

Conversation

galta95
Copy link
Contributor

@galta95 galta95 commented Nov 30, 2020

closes #12

@galta95 galta95 requested a review from syncush November 30, 2020 08:44
@galta95 galta95 linked an issue Nov 30, 2020 that may be closed by this pull request
@galta95 galta95 force-pushed the close-changeset branch 3 times, most recently from c7529d5 to ecb2dfe Compare November 30, 2020 11:28
@galta95 galta95 force-pushed the close-changeset branch 2 times, most recently from d31d742 to 4a6babf Compare November 30, 2020 12:06
@syncush syncush changed the title feat(/api/0.6/changeset/#id/close): new route feat(apiv6): implemented closeChangeset Nov 30, 2020
@@ -1,2 +1,3 @@
# node-osm-api

easy communication with osm api
Copy link
Contributor

Choose a reason for hiding this comment

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

add documentation to README.md how to close a changeset, add a code snippet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do it at the end

OwnerMismatchError,
NotAllowedError,
ChangesetAlreadyClosedError,
} from '../../lib/error-handler';
Copy link
Contributor

Choose a reason for hiding this comment

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

rename file to errors.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

throw new ChangesetNotFoundError(axiosError);
} else if (axiosError.response?.status === StatusCodes.CONFLICT) {
if (
axiosError.response.data === "The user doesn't own that changeset"
Copy link
Contributor

Choose a reason for hiding this comment

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

should be single quote, lets try to fix prettier configuration.

export the magic string to a constant

I see lines are breaking lets change prettier print-width option to 150

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. works, but when there is single quote inside the string it converts to double quote
  2. done
  3. done

@galta95 galta95 merged commit a291b71 into apiv6 Dec 3, 2020
@galta95 galta95 deleted the close-changeset branch December 3, 2020 08:33
syncush pushed a commit that referenced this pull request Dec 3, 2020
* feat(/api/0.6/changeset/create): create changeset (#7)

* feat(apiv6): implemented closeChangeset (#12)

* feat(apiv6): implemented upload Changeset (#14)
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.

PUT /api/0.6/changeset/#id/close
2 participants