format
This commit is contained in:
1 parent
0a408f8cfd
commit
4080ac8c2c
1 file changed
+7
-4
@@ -32,9 +32,7 @@ class MongoStatusPagesRepository implements IStatusPagesRepository {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
// Convert Buffer to base64 string for JSON serialization
|
// Convert Buffer to base64 string for JSON serialization
|
||||||
const base64Data = Buffer.isBuffer(logo.data)
|
const base64Data = Buffer.isBuffer(logo.data) ? logo.data.toString("base64") : logo.data;
|
||||||
? logo.data.toString("base64")
|
|
||||||
: logo.data;
|
|
||||||
return {
|
return {
|
||||||
data: base64Data,
|
data: base64Data,
|
||||||
contentType: logo.contentType,
|
contentType: logo.contentType,
|
||||||
@@ -105,7 +103,12 @@ class MongoStatusPagesRepository implements IStatusPagesRepository {
|
|||||||
return this.mapDocuments(statusPages);
|
return this.mapDocuments(statusPages);
|
||||||
};
|
};
|
||||||
|
|
||||||
updateById = async (id: string, teamId: string, image: Express.Multer.File | undefined, patch: Partial<StatusPage> & { removeLogo?: string }): Promise<StatusPage> => {
|
updateById = async (
|
||||||
|
id: string,
|
||||||
|
teamId: string,
|
||||||
|
image: Express.Multer.File | undefined,
|
||||||
|
patch: Partial<StatusPage> & { removeLogo?: string }
|
||||||
|
): Promise<StatusPage> => {
|
||||||
const { logo: _logo, removeLogo, ...restPatch } = patch;
|
const { logo: _logo, removeLogo, ...restPatch } = patch;
|
||||||
const updateData: StatusPageUpdateData = { ...restPatch };
|
const updateData: StatusPageUpdateData = { ...restPatch };
|
||||||
if (image) {
|
if (image) {
|
||||||
|
|||||||
Reference in new issue
Block a user