Skip to content

[MIM-2232] Created service to add markdown content in a node in repo no.ssb.pubmd#3176

Merged
olavlan-ssb merged 2 commits intoMIM-2232-markdownfrom
MIM-2232-post-markdown-service
Mar 18, 2025
Merged

[MIM-2232] Created service to add markdown content in a node in repo no.ssb.pubmd#3176
olavlan-ssb merged 2 commits intoMIM-2232-markdownfrom
MIM-2232-post-markdown-service

Conversation

@olavlan-ssb
Copy link

@olavlan-ssb olavlan-ssb commented Mar 13, 2025

The service provides an endpoint postMarkdown that takes parameters:

  • displayName
  • markdown : the raw content of a markdown file

The service then creates a node in the repo no.ssb.pubmd with properties displayName and markdown.

Jira Issues!

Link to ticket: MIM-2232

@olavlan-ssb olavlan-ssb requested a review from johnnadeluy March 13, 2025 09:12
@github-actions github-actions bot changed the title Created service to add markdown content in a node in repo no.ssb.pubmd [MIM-2232] Created service to add markdown content in a node in repo no.ssb.pubmd Mar 13, 2025
@olavlan-ssb olavlan-ssb changed the base branch from develop to MIM-2232-markdown March 13, 2025 09:13

export const post = (req: XP.Request): XP.Response => {
const setFields = (obj) => {
obj.displayName = req.params.displayName
Copy link
Contributor

@johnnadeluy johnnadeluy Mar 18, 2025

Choose a reason for hiding this comment

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

Suggestion:
const params = { displayName: req.params.displayName markdown: req.params.markdown }

})
} else {
const params = setFields({})
result = conn.create(params)
Copy link
Contributor

@johnnadeluy johnnadeluy Mar 18, 2025

Choose a reason for hiding this comment

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

And then you can set result = conn.create(params)

@sonarqubecloud
Copy link

Copy link
Contributor

@johnnadeluy johnnadeluy left a comment

Choose a reason for hiding this comment

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

Looks good 👏

@olavlan-ssb olavlan-ssb merged commit b348e07 into MIM-2232-markdown Mar 18, 2025
6 checks passed
@olavlan-ssb olavlan-ssb deleted the MIM-2232-post-markdown-service branch May 22, 2025 12:12
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.

3 participants