Prep for Category db work
This commit is contained in:
parent
1b919bbbc3
commit
dc3fb1f519
@ -5,7 +5,7 @@ const router = Router();
|
|||||||
|
|
||||||
router.get("/categories", route({}), (req: Request, res: Response) => {
|
router.get("/categories", route({}), (req: Request, res: Response) => {
|
||||||
// TODO:
|
// TODO:
|
||||||
// Load categories from db instead
|
// Load categories from db instead of hardcoding
|
||||||
|
|
||||||
const { locale, primary_only } = req.query;
|
const { locale, primary_only } = req.query;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import { BaseClassWithoutId } from "./BaseClass";
|
|||||||
// }]
|
// }]
|
||||||
|
|
||||||
@Entity("categories")
|
@Entity("categories")
|
||||||
export class Categories extends BaseClassWithoutId { // Not using snowflake
|
export class CategoryEntity extends BaseClassWithoutId { // Not using snowflake
|
||||||
|
|
||||||
@PrimaryColumn()
|
@PrimaryColumn()
|
||||||
id: number;
|
id: number;
|
||||||
@ -29,8 +29,4 @@ export class Categories extends BaseClassWithoutId { // Not using snowflake
|
|||||||
@Column()
|
@Column()
|
||||||
is_primary: boolean;
|
is_primary: boolean;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DefaultCategoryValue { // TODO: Load Default Discord Categories
|
|
||||||
|
|
||||||
}
|
}
|
1
util/src/util/Categories.ts
Normal file
1
util/src/util/Categories.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
//TODO: populate default discord categories + init, get and set methods
|
@ -1,6 +1,7 @@
|
|||||||
export * from "./ApiError";
|
export * from "./ApiError";
|
||||||
export * from "./BitField";
|
export * from "./BitField";
|
||||||
export * from "./Token";
|
export * from "./Token";
|
||||||
|
//export * from "./Categories";
|
||||||
export * from "./cdn";
|
export * from "./cdn";
|
||||||
export * from "./Config";
|
export * from "./Config";
|
||||||
export * from "./Constants";
|
export * from "./Constants";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user