app error
This commit is contained in:
1 parent
8e44718787
commit
07a2f36dd7
2 files changed
+3
-3
No files matched your search
@@ -3,14 +3,14 @@ export interface AppErrorConfig {
|
||||
status?: number;
|
||||
service?: string | null;
|
||||
method?: string | null;
|
||||
details?: any;
|
||||
details?: unknown;
|
||||
}
|
||||
|
||||
export class AppError extends Error {
|
||||
private status: number;
|
||||
private service: string | null;
|
||||
private method: string | null;
|
||||
private details: any;
|
||||
private details: unknown;
|
||||
|
||||
constructor({ message, status = 500, service = null, method = null, details = null }: AppErrorConfig) {
|
||||
super(message);
|
||||
|
||||
@@ -2,7 +2,7 @@ import sharp from "sharp";
|
||||
|
||||
const GenerateAvatarImage = async (file: Express.Multer.File) => {
|
||||
// Resize to target 64 * 64
|
||||
let resizedImageBuffer = await sharp(file.buffer)
|
||||
const resizedImageBuffer = await sharp(file.buffer)
|
||||
.resize({
|
||||
width: 64,
|
||||
height: 64,
|
||||
|
||||
Reference in new issue
Block a user