Skip to content

Commit

Permalink
Merge pull request #32 from brandonnorsworthy/updates
Browse files Browse the repository at this point in the history
allow saving filters
  • Loading branch information
brandonnorsworthy authored Sep 20, 2024
2 parents 6be4313 + 49770cc commit c28d307
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
24 changes: 13 additions & 11 deletions constants/categories.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { categoryName } from "../models/category";

const CATEGORIES: categoryName[] =[
'Monuments',
'PVE',
'Gambling',
'PVP',
'Roleplay',
'Automation',
'Troll',
'Exploration',
'Survival',
'Raid'
const CATEGORIES: categoryName[] = [
"PVP",
"PVE",
"Monuments",
"Exploration",
"Crafting",
"Gambling",
"Roleplay",
"Automation",
"Trolling",
"Survival",
"Raiding",
"Building"
]

export default CATEGORIES;
22 changes: 12 additions & 10 deletions models/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ type Category = {
deleted_by: Date | null;
};

export type categoryName = 'Monuments' |
'PVE' |
'Gambling' |
'PVP' |
'Roleplay' |
'Automation' |
'Troll' |
'Exploration' |
'Survival' |
'Raid';
export type categoryName = "PVP" |
"PVE" |
"Monuments" |
"Exploration" |
"Crafting" |
"Gambling" |
"Roleplay" |
"Automation" |
"Trolling" |
"Survival" |
"Raiding" |
"Building";

export default Category;
4 changes: 1 addition & 3 deletions validationSchemas/userSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export default {
voicePropsDLCQuests: Joi.boolean(),
sunburnDLCQuests: Joi.boolean(),
categoryFilters: Joi.array()
.items(
Joi.string().valid(...CATEGORIES)
),
.items(Joi.number()),
}).unknown(false),
}

0 comments on commit c28d307

Please sign in to comment.