Added: tests, signin api, not working docker

This commit is contained in:
2024-05-01 23:24:03 +02:00
parent dc1b955a8a
commit bd8a5d607f
14 changed files with 553 additions and 83 deletions

26
api/src/models/User.ts Normal file
View File

@ -0,0 +1,26 @@
import path from 'path';
import { Schema, model } from 'mongoose';
import { IUser } from '../validators/authValidator';
const schema = new Schema<IUser>(
{
username: {
type: String,
required: true
},
email: {
type: String,
required: true,
unique: true
},
password: {
type: String,
required: true
}
},
{
timestamps: true
}
);
export default model(path.basename(__filename).split('.')[0], schema);