Skip to content

Commit

Permalink
changed userId field to user for compatibility with verifyToken middl…
Browse files Browse the repository at this point in the history
…eware
  • Loading branch information
jackgarritano committed Feb 24, 2024
1 parent 942ed84 commit a1e4fbd
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/models/activities.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Schema = mongoose.Schema;

// Interface for Activities document
export interface ActivitiesType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
bullets: string[];
title: string;
Expand All @@ -15,7 +15,7 @@ export interface ActivitiesType extends mongoose.Document {

// Activities Schema
const Activities = new Schema<ActivitiesType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
bullets: { type: [String], required: true },
title: { type: String, required: true },
Expand Down
4 changes: 2 additions & 2 deletions src/models/education.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Schema = mongoose.Schema;

// Interface for Education document
export interface EducationType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
bullets: string[];
title: string;
Expand All @@ -15,7 +15,7 @@ export interface EducationType extends mongoose.Document {

// Education Schema
const Education = new Schema<EducationType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
bullets: { type: [String], required: true },
title: { type: String, required: true },
Expand Down
4 changes: 2 additions & 2 deletions src/models/experience.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Schema = mongoose.Schema;

//typescript type corresponding with the mongoose schema structure
export interface experienceType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
bullets: string[];
title: string;
Expand All @@ -17,7 +17,7 @@ export interface experienceType extends mongoose.Document {

//mongoose schema for an event document
const Experience = new Schema<experienceType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
bullets: { type: [String], required: true },
title: { type: String, required: true },
Expand Down
4 changes: 2 additions & 2 deletions src/models/folder.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const Schema = mongoose.Schema;

//typescript type corresponding with the mongoose schema structure
export interface folderType extends mongoose.Document {
userId: string;
user: string;
name: string;
resumeIds: mongoose.Schema.Types.ObjectId[];
folderIds: mongoose.Schema.Types.ObjectId[];
}

const Folder = new Schema<folderType>({
userId: { type: String, required: true },
user: { type: String, required: true },
name: { type: String, required: true },
resumeIds: { type: [Schema.Types.ObjectId], required: true, ref: 'ResumeModel' },
folderIds: { type: [Schema.Types.ObjectId], required: true, ref: 'FolderModel' },
Expand Down
4 changes: 2 additions & 2 deletions src/models/heading.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface HeadingItem {

// Interface for Contact details document
export interface HeadingType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
name: string;
items: HeadingItem[];
Expand All @@ -26,7 +26,7 @@ const headingItemSchema = new Schema<HeadingItem>(

// Schema for HeadingType which includes HeadingItem
const Heading = new Schema<HeadingType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
name: { type: String, required: true },
items: [headingItemSchema],
Expand Down
4 changes: 2 additions & 2 deletions src/models/project.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Schema = mongoose.Schema;

// Interface for Project document
export interface ProjectType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
bullets: string[];
title: string;
Expand All @@ -13,7 +13,7 @@ export interface ProjectType extends mongoose.Document {

// Project Schema
const Project = new Schema<ProjectType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
bullets: { type: [String], required: true },
title: { type: String, required: true },
Expand Down
4 changes: 2 additions & 2 deletions src/models/resume.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const Schema = mongoose.Schema;

//typescript type corresponding with the mongoose schema structure
export interface resumeType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
itemIds: mongoose.Schema.Types.ObjectId[];
templateId: mongoose.Schema.Types.ObjectId;
}

const Resume = new Schema<resumeType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
itemIds: { type: [Schema.Types.ObjectId], required: true },
templateId: { type: Schema.Types.ObjectId, required: true },
Expand Down
4 changes: 2 additions & 2 deletions src/models/sectionHeading.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ const Schema = mongoose.Schema;

// Interface for Section Heading document
export interface SectionHeadingType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
title: string;
}

// Section Heading Schema
const SectionHeading = new Schema<SectionHeadingType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
title: { type: String, required: true },
});
Expand Down
4 changes: 2 additions & 2 deletions src/models/skills.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ const Schema = mongoose.Schema;

// Interface for Skills document
export interface SkillsType extends mongoose.Document {
userId: string;
user: string;
itemName: string;
title: string;
description: string;
}

// Skills Schema
const Skills = new Schema<SkillsType>({
userId: { type: String, required: true },
user: { type: String, required: true },
itemName: { type: String, required: true },
title: { type: String, required: true },
description: { type: String, required: true },
Expand Down

0 comments on commit a1e4fbd

Please sign in to comment.