refactor(db/models): change chapter schema creation call
`new mongoose.Schema` -> `new Schema`
This commit is contained in:
parent
40524941c6
commit
8cea9303e1
@ -1,4 +1,4 @@
|
|||||||
import mongoose, { Schema, PopulatedDoc, Document, Model } from "mongoose";
|
import { Schema, PopulatedDoc, Document, Model } from "mongoose";
|
||||||
import { IBand } from "@models/band";
|
import { IBand } from "@models/band";
|
||||||
export interface IChapter {
|
export interface IChapter {
|
||||||
title: string;
|
title: string;
|
||||||
@ -17,7 +17,7 @@ export interface IChapter {
|
|||||||
posted?: Date;
|
posted?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Chapter = new mongoose.Schema<IChapter>({
|
export const Chapter = new Schema<IChapter>({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
|
Loading…
Reference in New Issue
Block a user