Try other way of querying?
This commit is contained in:
parent
8a282f2927
commit
e31568b997
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user