feat: add list command to retrieve and paginate user files

This commit is contained in:
grngxd 2025-07-31 20:44:22 +01:00
parent 5fd014b677
commit a5457c6cc6
6 changed files with 153 additions and 17 deletions

12
lib/b64.ts Normal file
View file

@ -0,0 +1,12 @@
// i actually love this
export const b64encode = (obj: object): string => {
return Buffer.from(JSON.stringify(obj)).toString("base64url");
}
export const b64decode = <T>(str: string): T => {
try {
return JSON.parse(Buffer.from(str, "base64url").toString());
} catch {
throw new Error("invalid base64-encoded object string: " + str);
}
}