Try other way of querying?

This commit is contained in:
Rory& 2025-10-11 06:39:02 +02:00
parent 8a282f2927
commit e31568b997

View File

@ -128,11 +128,7 @@ export class UserSettings extends BaseClassWithoutId {
public static async getOrDefault(userId: string) {
// raw sql query
const userSettingsIndex = await User.getRepository()
.createQueryBuilder()
.select("settingsIndex")
.where('id = :id', { id: userId })
.execute();
const userSettingsIndex = await this.getRepository().query("SELECT \"settingsIndex\" FROM users WHERE id = $1", [userId]);
console.log(`[INFO/UserSettings] Fetched settings index for user ${userId}:`, userSettingsIndex);