Skip to content

Commit

Permalink
feat: update Question schema
Browse files Browse the repository at this point in the history
  • Loading branch information
HereEast committed Feb 16, 2025
1 parent 1761a3c commit 4e6b47e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/layouts/QuestionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { BASE_URL } from "~/utils/constants";
export async function QuestionsPage() {
const questions = await getQuestions();

console.log(questions);

if (!questions) {
notFound();
}
Expand Down
4 changes: 2 additions & 2 deletions src/models/Question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface IQuestion extends Document {
body: string;
description: string;
order: number;
active: boolean;
isActive: boolean;
answerView?: AnswerViewType;
}

Expand All @@ -16,7 +16,7 @@ const QuestionSchema = new Schema({
body: { type: String, required: true, unique: true },
description: { type: String },
order: { type: Number, required: true, unique: true },
active: { type: Boolean, required: true, default: true },
isActive: { type: Boolean, required: true, default: true },
answerView: { type: String, enum: ["links", "all"] },
});

Expand Down

0 comments on commit 4e6b47e

Please sign in to comment.