mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
Better logs
This commit is contained in:
parent
284d9ab21b
commit
40da658fb1
@ -43,11 +43,11 @@ export default (user: ILocalUser, url: string, object: any) => new Promise(async
|
||||
'Digest': `SHA-256=${hash}`
|
||||
}
|
||||
}, res => {
|
||||
logger.info(`${url} --> ${res.statusCode}`);
|
||||
|
||||
if (res.statusCode >= 400) {
|
||||
logger.warn(`${url} --> ${res.statusCode}`);
|
||||
reject(res);
|
||||
} else {
|
||||
logger.succ(`${url} --> ${res.statusCode}`);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user