Skip to content

Commit c9ca0e7

Browse files
set max time
1 parent 16c1b87 commit c9ca0e7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/models/v2/skins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ async function v2ListSkins(req: MineSkinV2Request, res: Response<V2SkinListRespo
118118
.populate('data', 'hash.skin.minecraft')
119119
.sort(sort)
120120
.comment("v2 list skins")
121+
.maxTimeMS(10_000)
121122
.exec();
122123

123124
let lastSkin = skins[skins.length - 1];

src/routes/get.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ export const register = (app: Application) => {
178178
.select({'_id': 0, id: 1, uuid: 1, skinUuid: 1, name: 1, url: 1, time: 1})
179179
.sort({time: -1})
180180
.comment("v1 pagination list")
181+
.maxTimeMS(10_000)
181182
.lean()
182183
.exec();
183184
});
@@ -257,6 +258,7 @@ export const register = (app: Application) => {
257258
.select({'_id': 0, id: 1, uuid: 1, skinUuid: 1, name: 1, url: 1, time: 1, variant: 1, model: 1})
258259
.sort({time: -1})
259260
.comment("v1 pagination anchor list")
261+
.maxTimeMS(10_000)
260262
.lean()
261263
.exec();
262264
});

0 commit comments

Comments
 (0)