Skip to content

Comments

Fix public_read property reporting in GET single and PUT/POST project endpoints#24

Merged
awagner-mainz merged 3 commits intomainfrom
copilot/fix-public-read-property-reporting
Feb 15, 2026
Merged

Fix public_read property reporting in GET single and PUT/POST project endpoints#24
awagner-mainz merged 3 commits intomainfrom
copilot/fix-public-read-property-reporting

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

The public_read property was missing from GET single project responses and PUT/POST responses returned the input value instead of the database value, causing inconsistent reporting across endpoints.

Changes

GET single project (getProjectFunc)

  • Added PublicRead: p.PublicRead.Bool to ProjectFull response initialization

PUT/POST project (putProjectFunc)

  • Added RetrieveProject query after upsert to fetch actual database values
  • Changed response from input.Body.PublicRead to proj.PublicRead.Bool
// Before: echoed input
response.Body.PublicRead = input.Body.PublicRead

// After: query and use actual DB value
proj, err := queries.RetrieveProject(ctx, database.RetrieveProjectParams{
    Owner:         input.UserHandle,
    ProjectHandle: projectHandle,
})
response.Body.PublicRead = proj.PublicRead.Bool

Tests

  • Updated public_access_test.go expectation from false to true
  • Added public_read_property_test.go with coverage for all endpoints

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 15, 2026 14:50
… project responses

Co-authored-by: awagner-mainz <2088443+awagner-mainz@users.noreply.github.com>
…endpoints

Co-authored-by: awagner-mainz <2088443+awagner-mainz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix public_read property reporting for project endpoints Fix public_read property reporting in GET single and PUT/POST project endpoints Feb 15, 2026
Copilot AI requested a review from awagner-mainz February 15, 2026 14:54
Copy link
Contributor

@awagner-mainz awagner-mainz 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.

@awagner-mainz awagner-mainz marked this pull request as ready for review February 15, 2026 15:04
@awagner-mainz awagner-mainz merged commit 8aa27ec into main Feb 15, 2026
1 check passed
@awagner-mainz awagner-mainz deleted the copilot/fix-public-read-property-reporting branch February 15, 2026 15:06
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.

2 participants