feat: adding image processing

This commit is contained in:
Chubby Granny Chaser
2024-09-14 00:09:34 +01:00
18 changed files with 165 additions and 77 deletions

View File

@@ -166,6 +166,14 @@ export class PythonInstance {
this.downloadingGameId = -1;
}
static async processProfileImage(imagePath: string) {
return this.rpc
.post<{ imagePath: string; mimeType: string }>("/profile-image", {
image_path: imagePath,
})
.then((response) => response.data);
}
private static async handleRpcError(_error: unknown) {
await this.rpc.get("/healthcheck").catch(() => {
logger.error(