Changeset 226fbbb for pages/dashboard/admin/adminDashboard.telefunc.ts
- Timestamp:
- 12/23/25 04:21:42 (7 months ago)
- Branches:
- main
- Children:
- ea09e98
- Parents:
- ee1fa4e
- File:
-
- 1 edited
-
pages/dashboard/admin/adminDashboard.telefunc.ts (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pages/dashboard/admin/adminDashboard.telefunc.ts
ree1fa4e r226fbbb 2 2 import { requireAdmin } from "../../../server/telefunc/ctx"; 3 3 import {Abort} from "telefunc"; 4 import { validateComponentSpecificData } from "../../../database/drizzle/config/componentFieldConfig"; 4 5 5 6 export async function getAdminInfoAndData() { … … 22 23 } 23 24 24 export async function setPopupBuildApprovalStatus({ buildId, isApproved }25 export async function onSetBuildApprovalStatus({ buildId, isApproved } 25 26 : { buildId: number; isApproved: boolean }) { 26 27 const { c, userId } = await requireAdmin() … … 35 36 } 36 37 37 export async function setComponentSuggestionStatus({ suggestionId, status, adminComment }38 export async function onSetComponentSuggestionStatus({ suggestionId, status, adminComment } 38 39 : { suggestionId: number; status: string; adminComment: string }) { 39 40 const { c, userId } = await requireAdmin() … … 48 49 return { success: true }; 49 50 } 51 52 export async function onCreateNewComponent({ name, brand, price, imgUrl, type, specificData } 53 : { name: string; brand: string; price: number; imgUrl: string; type: string, specificData: any }) { 54 55 const { c, userId } = await requireAdmin() 56 57 if(!validateComponentSpecificData(type, specificData)) throw Abort(); 58 59 const newComponentId = await drizzleQueries.addNewComponent(c.db, name, brand, price, imgUrl, type, specificData); 60 61 if(!newComponentId) throw Abort(); 62 63 return newComponentId; 64 }
Note:
See TracChangeset
for help on using the changeset viewer.
