GithubHelp home page GithubHelp logo

lucianosimoni / ai-interviewer-server Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 159 KB

Node.js ▪️ OpenAI 🤖 ▪️ AWS EC2 ▪️ Ubuntu ▪️ Prisma RDM ▪️ PostgreSQL

Home Page: https://ai-interviewer.onrender.com

JavaScript 100.00%
ec2-instance expressjs node-js nodejs openai-api postgresql prisma-client ubuntu-server

ai-interviewer-server's People

Contributors

lucianosimoni avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

shreyas-donki

ai-interviewer-server's Issues

Create endpoint for Database - Register User

Issue

Using Prisma Client and Express, create a new Post endpoint at the path /user where the Prisma Client calls a creation of a new user into the Database.

📦 Request must be:

{
   "email": "[email protected]",
   "password_hash": "password",
   "first_name": "luciano",
   "last_name": "simoni"
}

🟢 Response must be the newly created user:

{
   "id": 0,
   "email": "[email protected]",
   "role": "USER",
   "Profile": {
      "id": 0,
      "first_name": "luciano",
      "last_name": "simoni"
   }
}

🔴 Error responses:

//400
{
   "error": {
      "title": "Bad request",
      "message": "Request body is missing arguments"
   }
}
   

Add new field to User table

Problem

the User table must have the role field added.
It must also have the default argumento to be "USER" - @default(USER

Current possible roles will then be:

  • USER
  • ADMIN

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.