Fixed model registration

This commit is contained in:
lucast committed 2026-09-30 01:22:49 +02:00
1 parent 492a54dd0d
commit e02cb83235
4 files changed
+6

No files matched your search

+2
View File
@@ -1,4 +1,6 @@
import mongoose, { Schema, type Model } from "mongoose"
import "./artist"
import "./genre"
const albumSchema = new Schema({
name: { type: String, required: true },
+1
View File
@@ -1,5 +1,6 @@
import { randomUUID } from "node:crypto"
import mongoose, { Schema, type Model } from "mongoose"
import "./user"
export function getSessionModel(sessionTtlMs: number) {
if (mongoose.models.Session) return mongoose.models.Session as Model<any>
+2
View File
@@ -1,4 +1,6 @@
import mongoose, { Schema, type Model } from "mongoose"
import "./album"
import "./artist"
const trackSchema = new Schema({
name: { type: String, required: true },
+1
View File
@@ -1,5 +1,6 @@
import { randomUUID } from "node:crypto"
import mongoose, { Schema, type Model } from "mongoose"
import "./track"
const userSchema = new Schema(
{