Backend: code formatted

This commit is contained in:
2024-05-12 21:25:52 +02:00
parent fa25015472
commit bf791db47f
26 changed files with 574 additions and 469 deletions

View File

@ -1,34 +1,34 @@
import path from 'path';
import { Schema, model } from 'mongoose';
import { IBeer } from '../validators/beerValidator';
import path from "path";
import { Schema, model } from "mongoose";
import { IBeer } from "../validators/beerValidator";
const schema = new Schema<IBeer | any>(
{
name: {
type: String,
required: true
required: true,
},
degree: {
type: Number,
required: true
required: true,
},
packaging: {
type: String,
required: true
required: true,
},
brand: {
type: String,
required: true
required: true,
},
imgs: {
type: Array,
required: false,
default: []
}
default: [],
},
},
{
timestamps: true
}
timestamps: true,
},
);
export default model(path.basename(__filename).split('.')[0], schema);
export default model(path.basename(__filename).split(".")[0], schema);