Restructured services to support more... services

This commit is contained in:
2025-12-31 09:51:31 -05:00
parent c02e4e2851
commit 0e6a3c4a01
17 changed files with 58 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
import pool from "../db"
import pool from "../../db"
import { Course, CourseAttendee, CourseAttendeeRole, CourseEventDetails, CourseEventSummary, RawAttendeeRow } from "@app/shared/types/course"
import { PagedData } from "@app/shared/types/pagination";
import { toDateTime } from "@app/shared/utils/time";

View File

@@ -1,5 +1,5 @@
import { ApplicationListRow, ApplicationRow, CommentRow } from "@app/shared/types/application";
import pool from "../db";
import pool from "../../db";
import { error } from "console";
export async function createApplication(memberID: number, appVersion: number, app: string) {

View File

@@ -1,4 +1,4 @@
import pool from '../db';
import pool from '../../db';
import { CalendarEventShort, CalendarSignup, CalendarEvent, CalendarAttendance } from "@app/shared/types/calendar"
import { toDateTime } from "@app/shared/utils/time"

View File

@@ -1,5 +1,5 @@
import { toDateTime } from "@app/shared/utils/time";
import pool from "../db";
import pool from "../../db";
import { LOARequest, LOAType } from '@app/shared/types/loa'
import { PagedData } from '@app/shared/types/pagination'

View File

@@ -1,5 +1,5 @@
import { Role } from "@app/shared/types/roles";
import pool from "../db";
import pool from "../../db";
import { Member, MemberCardDetails, MemberLight, memberSettings, MemberState } from '@app/shared/types/member'
export async function getUserData(userID: number): Promise<Member> {

View File

@@ -1,6 +1,6 @@
import { BatchPromotion, BatchPromotionMember } from "@app/shared/schemas/promotionSchema";
import { PromotionDetails, PromotionSummary } from "@app/shared/types/rank"
import pool from "../db";
import pool from "../../db";
import { PagedData } from "@app/shared/types/pagination";
import { toDateTime } from "@app/shared/utils/time";

View File

@@ -1,5 +1,5 @@
import { MemberLight } from '@app/shared/types/member';
import pool from '../db';
import pool from '../../db';
import { Role, RoleSummary } from '@app/shared/types/roles'
export async function assignUserGroup(userID: number, roleID: number) {

View File

@@ -1,4 +1,4 @@
import pool from "../db"
import pool from "../../db"
export async function assignUserToStatus(userID: number, statusID: number) {
const sql = `INSERT INTO members_statuses (member_id, status_id, start_date) VALUES (?, ?, NOW())`