style: Fancier logging

This commit is contained in:
April Hall 2025-02-25 02:51:53 -05:00
parent 3c99016687
commit 0a26c2e5ab
No known key found for this signature in database
GPG Key ID: A49AC35CB186266C
2 changed files with 3 additions and 2 deletions

View File

@ -15,11 +15,12 @@ class AuthDb {
setUserName(userId: string, newUsername: string) { setUserName(userId: string, newUsername: string) {
this.client.prepare('UPDATE user SET username = ? WHERE id = ?').run(newUsername, userId); this.client.prepare('UPDATE user SET username = ? WHERE id = ?').run(newUsername, userId);
console.log('wam bam'); console.log(`\x1b[35m[AUTHDB]\x1b[0m changed username for ${userId} to ${newUsername}`);
} }
setUserImage(userId: string, image: string) { setUserImage(userId: string, image: string) {
this.client.prepare('UPDATE user SET image = ? WHERE id = ?').run(image, userId); this.client.prepare('UPDATE user SET image = ? WHERE id = ?').run(image, userId);
console.log(`\x1b[35m[AUTHDB]\x1b[0m changed pfp for ${userId} to ${image}`);
} }
getUser(userId: string): Profile { getUser(userId: string): Profile {

View File

@ -50,7 +50,7 @@ class MinioClient {
try { try {
const bucket = 'profile-photos'; const bucket = 'profile-photos';
if (!(await this.client.bucketExists(bucket))) { if (!(await this.client.bucketExists(bucket))) {
console.log(`Creating bucket '${bucket}', as it is required but does not exist.`); console.log(`\x1b[35m[S3]\x1b[0m Creating bucket '${bucket}', as it is required but does not exist.`);
this.client.makeBucket(bucket); this.client.makeBucket(bucket);
} }