-
Notifications
You must be signed in to change notification settings - Fork 3
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
implement PUT /api/0.6/changeset/create #7
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ea0d42d
feat(/api/0.6/changeset/create): new rout
galta95 a427f41
test(/api/0.6/changeset/create): unit test
galta95 56733b0
feat(eslint): added semicolon role
galta95 39b71a1
style(lint): missing semicolons and change file name
galta95 5b570b2
build(npm): added nock
galta95 a2bf377
Merge branch 'master' into create-changeset-rout
galta95 05098c9
style(lint): added semicolon
galta95 014d8c7
refactor(/api/0.6/changeset/create): refactor requested changes
galta95 b6cdffd
fix(/api/0.6/changeset/create): move out the res parsing from try & c…
galta95 8718281
refactor(all): use generics
galta95 a78eca8
refactor(/api/0.6/changeset/create): error handler
galta95 57f1734
ci(tests): added unit tests and lint workflows (#11)
galta95 350eaca
refactor(.github/workflows): added linting to tests directories
galta95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import Apiv6 from './api/v6'; | ||
|
||
export default Apiv6; | ||
export default Apiv6; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
export function response(code: number, message: string): {code: number, message: string} { | ||
return { | ||
code: code, | ||
message: message | ||
}; | ||
export interface IResponse<T = string> { | ||
status: number, | ||
data: T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const testConf = { | ||
url: 'http://test.com:8080', | ||
baseUrl: 'http://test.com:8080', | ||
username: 'USERNAME', | ||
password: 'PASSWORD' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import xml from 'xml'; | ||
|
||
export function createChangesetXml(generator: string, createdBy: string, host: string): string { | ||
export function createChangesetXml(generator: string, createdBy: string): string { | ||
const data = [{ | ||
osm: [ | ||
{ changeset: [ | ||
{_attr: {version: 0.6, generator: generator}}, | ||
{ tag: {_attr: {k: "created_by", v: createdBy}}}, | ||
{ tag: {_attr: {k: "host", v: host}} }, | ||
{ _atter: {version: 0.6, generator: generator}}, | ||
{ tag: {_attr: {k: "created_by", v: createdBy}}} | ||
]}] | ||
}]; | ||
return createtXml(data); | ||
} | ||
|
||
function createtXml(file: any) { | ||
function createtXml(file: any): string { | ||
const osmXml = xml(file); | ||
return osmXml; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types node should be devDep