mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
style: add @typescript-eslint/return-await rule (#9612)
This commit is contained in:
@@ -91,7 +91,7 @@ async function resizeImage(blob: Blob | File): Promise<Blob | null> {
|
||||
if (ctx) {
|
||||
ctx.imageSmoothingQuality = 'high';
|
||||
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||
return new Promise(resolve =>
|
||||
return await new Promise(resolve =>
|
||||
canvas.toBlob(blob => resolve(blob), 'image/jpeg', 0.8)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ export class AuthService extends Service {
|
||||
this.session.revalidate();
|
||||
|
||||
track.$.$.auth.signedIn({ method: 'oauth', provider });
|
||||
return res.json();
|
||||
return await res.json();
|
||||
} catch (e) {
|
||||
track.$.$.auth.signInFail({
|
||||
method: 'oauth',
|
||||
|
||||
Reference in New Issue
Block a user