Update bcryptjs to version 3.0.3 and add smoke-tracker router to the server configuration.

This commit is contained in:
Primakov Alexandr Alexandrovich
2025-11-17 13:25:20 +03:00
parent 4c166a8d33
commit f6f9163c3f
15 changed files with 1230 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
const { Schema, model } = require('mongoose')
const { SMOKE_TRACKER_USER_MODEL_NAME } = require('../const')
const schema = new Schema({
login: { type: String, required: true, unique: true },
created: {
type: Date,
default: () => new Date().toISOString(),
},
})
schema.set('toJSON', {
virtuals: true,
versionKey: false,
transform: function (doc, ret) {
delete ret._id
},
})
schema.virtual('id').get(function () {
return this._id.toHexString()
})
exports.SmokeUserModel = model(SMOKE_TRACKER_USER_MODEL_NAME, schema)