lucianosimoni / ai-interviewer-server Goto Github PK
View Code? Open in Web Editor NEWNode.js ▪️ OpenAI 🤖 ▪️ AWS EC2 ▪️ Ubuntu ▪️ Prisma RDM ▪️ PostgreSQL
Home Page: https://ai-interviewer.onrender.com
Node.js ▪️ OpenAI 🤖 ▪️ AWS EC2 ▪️ Ubuntu ▪️ Prisma RDM ▪️ PostgreSQL
Home Page: https://ai-interviewer.onrender.com
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"
}
}
Accordingly to the Prisma documentation, is best-practice to name the tables with first char uppercase.
Currently, all tables have first char lowercase.
Add @@map(tableName)
to the models so all of them accept the referencing in lowercase also.
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.