1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-05 10:18:42 +09:00

Better logs

This commit is contained in:
syuilo 2019-02-06 15:06:23 +09:00
parent 9835945ee1
commit 71ba72e796
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -43,11 +43,11 @@ export default (user: ILocalUser, url: string, object: any) => new Promise(async
'Digest': `SHA-256=${hash}` 'Digest': `SHA-256=${hash}`
} }
}, res => { }, res => {
logger.info(`${url} --> ${res.statusCode}`);
if (res.statusCode >= 400) { if (res.statusCode >= 400) {
logger.warn(`${url} --> ${res.statusCode}`);
reject(res); reject(res);
} else { } else {
logger.succ(`${url} --> ${res.statusCode}`);
resolve(); resolve();
} }
}); });