add easy setup

This commit is contained in:
Darius
2025-09-26 19:05:49 +02:00
parent 95693c0201
commit a0a76a8b75
18 changed files with 313 additions and 54 deletions

12
src/util/general.ts Normal file
View File

@@ -0,0 +1,12 @@
import { apiClient } from "../core/api-client";
import { logError, logInfo } from "./logger";
export async function getUserId(username: string): Promise<string | null> {
const user = await apiClient.users.getUserByName(username);
if (user) {
logInfo(`${user.name} => ${user.id}`);
return user.id;
}
logError(`no user with name ${username} found`);
return null;
}