Skip to content

4/post admin trees#18

Merged
seanmnguyen merged 8 commits intodevelopfrom
4/post-admin-trees
Jan 21, 2026
Merged

4/post admin trees#18
seanmnguyen merged 8 commits intodevelopfrom
4/post-admin-trees

Conversation

@dbenshachar
Copy link
Collaborator

@dbenshachar dbenshachar commented Jan 20, 2026

Developer: {David Benshachar}

Closes #{4}

Pull Request Summary

Adds authentication method for future POST requests by using function that creates a client using bearer tokens. Adds POST function with error handling to insert requests into tree table on supabase.

Modifications

Modified supabase-client.ts to add createAuthenticatedClient which creates a client using the bearer token. Modified api/admin/trees/route.ts to include POST method with documentation.

Testing Considerations

I have tested removing required parts of the body for insertions as well as including or removing optional parts of the body. I have verified that the error handling for these cases is correct. In addition, I have tested invalid and expired bearer tokens for authentication. This testing has verified that the request can insert parts into the "trees" table on supabase.

Pull Request Checklist

  • Code is neat, readable, and works
  • Comments are appropriate
  • The commit messages follows our guidelines
  • The developer name is specified
  • The summary is completed
  • Assign reviewers

Screenshots/Screencast

image image image

{put screenshots of your change, or even better a screencast displaying the functionality}

Copy link
Collaborator

@seanmnguyen seanmnguyen left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks for implementing the auth client and tokens! You're one step ahead of us haha

For future reference with the PR template, please delete the things inside the curly braces {...} and replace it with your content. For the issue linking specifically, you can just do "Closes #4" and that will automatically link to the issue (no need to manually add the link with markdown!)

@seanmnguyen seanmnguyen merged commit f1d3f5e into develop Jan 21, 2026
4 checks passed
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.

POST Admin Trees API

2 participants