changes/fixes + some WIP

This commit is contained in:
Daniel
2023-05-26 23:22:18 +03:30
parent ffecdf21a0
commit 7f3d93517d
9 changed files with 314 additions and 26 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import bcrypt from "bcrypt";
export default async function (user: AccountSettings, userId: number) {
const profilePic = user.profilePic;
if (profilePic && profilePic !== "DELETE") {
if (profilePic?.startsWith("data:image/jpeg;base64")) {
if ((user?.profilePic?.length as number) < 1572864) {
try {
const filePath = path.join(