mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Fetch userId from DB & small fixes
This commit is contained in:
@@ -1626,6 +1626,20 @@ class Database {
|
||||
`UPDATE gamelog_join_leave SET time = 0 WHERE id IN (${badEntriesList})`
|
||||
);
|
||||
}
|
||||
|
||||
async getUserIdFromDisplayName(displayName) {
|
||||
var userId = '';
|
||||
await sqliteService.execute(
|
||||
(row) => {
|
||||
userId = row[0];
|
||||
},
|
||||
`SELECT user_id FROM gamelog_join_leave WHERE display_name = @displayName AND user_id != "" ORDER BY id DESC LIMIT 1`,
|
||||
{
|
||||
'@displayName': displayName
|
||||
}
|
||||
);
|
||||
return userId;
|
||||
}
|
||||
}
|
||||
|
||||
var self = new Database();
|
||||
|
||||
Reference in New Issue
Block a user