Skip to content

Conversation

@MattA-Official
Copy link
Contributor

This pr changes the ORM used, API routes, and authorisation.

ORM

Mongoose -> Prisma

We still use MongoDB, but rather than Mongoose to manage data, we are now using Prisma. Prisma is an open source next-generation ORM. It contains an auto-generated and type-safe query builder for Node.js & TypeScript.

API

Get users

  GET /api/users?page=1&count=10
Parameter Type Description Default
page int The page number to fetch 1
count int The number of users to fetch 10

Get user

  GET /api/users/[uid]
Parameter Type Description Required
uid string The user id to fetch

Create / update user

  PUT /api/users/[uid]
Parameter Type Description Required
uid string The user id to fetch

Search user

  GET /api/users/search?query=
Parameter Type Description Required
query string The search query

@MattA-Official MattA-Official added enhancement New feature or request help wanted Extra attention is needed labels Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants