We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aed9b9 commit 58b5c86Copy full SHA for 58b5c86
provider.ts
@@ -211,6 +211,16 @@ export default class LuoguProvider extends BasicFetcher implements IBasicProvide
211
async checkStatus(onCheckFunc) {
212
if (!onCheckFunc || !this.quota || this.quota.updateAt < Date.now() - Time.day) {
213
const { body } = await this.get('/judge/quotaAvailable');
214
+ if (!body.quotas.length) {
215
+ logger.error('未找到正在生效的套餐');
216
+ return onCheckFunc ? '你的账户未开通评测服务或评测套餐已过期' : {
217
+ orgName: null,
218
+ availablePoints: -1,
219
+ createTime: 0,
220
+ expireTime: 0,
221
+ updateAt: Date.now(),
222
+ };
223
+ }
224
this.quota = {
225
orgName: body.quotas[0].org.name,
226
availablePoints: body.quotas[0].availablePoints ?? -1,
0 commit comments