8000 fix: fixed a bug not returning is_star and permission properties from /api/storymaps endpoint. by JinIgarashi · Pull Request #5021 · UNDP-Data/geohub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: fixed a bug not returning is_star and permission properties from /api/storymaps endpoint. #5021

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

Merged
merged 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/four-cougars-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"geohub": patch
---

fix: fixed a bug not returning is_star and permission properties from /api/storymaps endpoint.
18 changes: 9 additions & 9 deletions sites/geohub/src/lib/server/StorymapManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ class StorymapManager {
a.updatedat,
a.updated_user,
CASE WHEN z.no_stars is not null THEN cast(z.no_stars as integer) ELSE 0 END as no_stars,
${
excludeChapter === true
? `'{}'::integer[] as chapters`
: `
${
user_email
? `
Expand All @@ -118,11 +114,15 @@ class StorymapManager {
`
: 'false as is_star,'
}
${
!is_superuser && user_email
? `CASE WHEN p.permission is not null THEN p.permission ELSE null END`
: `${is_superuser ? Permission.OWNER : 'null'}`
} as permission,
${
!is_superuser && user_email
? `CASE WHEN p.permission is not null THEN p.permission ELSE null END`
: `${is_superuser ? Permission.OWNER : 'null'}`
} as permission,
${
excludeChapter === true
? `'{}'::integer[] as chapters`
: `
array_to_json(array_agg(row_to_json((
SELECT p FROM (
SELECT
Expand Down
Loading
0