Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create Item Mutation #26

Open
6 tasks done
kavinphan opened this issue Feb 4, 2025 · 0 comments · May be fixed by #42
Open
6 tasks done

Create Item Mutation #26

kavinphan opened this issue Feb 4, 2025 · 0 comments · May be fixed by #42
Assignees
Labels

Comments

@kavinphan
Copy link
Contributor

kavinphan commented Feb 4, 2025

Description

Create a POST route handler at /api/items that accepts form data, creates an Item record using the form data. The form data will include the following fields: title, category, quantity, expiration, unitSize, datePosted, lotNumber, donorName, and unitPrice.

Success Criteria

  • 401 if no session
  • 403 if user is not an ADMIN or SUPER_ADMIN
  • The form data is validated using a zod schema
  • An Item record is created
  • The route handler is documented with a description of its function, parameters, and responses
  • There is a test file that covers the success criteria
@kavinphan kavinphan changed the title Create Unallocated Item Mutation Create Item Mutation Feb 4, 2025
@kavinphan kavinphan added this to the admin unallocated items page milestone Feb 4, 2025
@alexdcdc alexdcdc linked a pull request Feb 14, 2025 that will close this issue
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants