Refactor imports and types for consistency and remove redundant paths

- Updated relative imports by replacing `@/` aliases with proper `../` paths for consistency.
- Refined type definitions in IPC handlers and repositories (`User`, `Chapter`, `Act`, etc.).
- Simplified return types in `Location` model methods for streamlined usage.
This commit is contained in:
natreex
2026-01-12 14:22:27 -05:00
parent cc7d03bee9
commit 8bad6159cf
11 changed files with 25 additions and 24 deletions

View File

@@ -115,7 +115,7 @@ export default class UserRepo {
* @throws Error if the user is not found or cannot be retrieved
*/
public static fetchUserInfos(userId: string, lang: 'fr' | 'en' = 'fr'): UserInfosQueryResponse {
let userInfo: Record<string, SQLiteValue> | undefined;
let userInfo: UserInfosQueryResponse | undefined;
try {
const db: Database = System.getDb();
const query: string = `
@@ -125,7 +125,7 @@ export default class UserRepo {
WHERE user_id = ?
`;
const params: SQLiteValue[] = [userId];
userInfo = db.get(query, params);
userInfo = db.get(query, params) as UserInfosQueryResponse | undefined;
} catch (error: unknown) {
if (error instanceof Error) {
console.error(`DB Error: ${error.message}`);
@@ -208,7 +208,7 @@ export default class UserRepo {
* @throws Error if the account is not found or cannot be retrieved
*/
public static fetchAccountInformation(userId: string, lang: 'fr' | 'en' = 'fr'): UserAccountQuery {
let accountInfo: Record<string, SQLiteValue> | undefined;
let accountInfo: UserAccountQuery | undefined;
try {
const db: Database = System.getDb();
const query: string = `
@@ -217,7 +217,7 @@ export default class UserRepo {
WHERE user_id = ?
`;
const params: SQLiteValue[] = [userId];
accountInfo = db.get(query, params);
accountInfo = db.get(query, params) as UserAccountQuery | undefined;
} catch (error: unknown) {
if (error instanceof Error) {
console.error(`DB Error: ${error.message}`);