Skip to content

Commit fba4fd4

Browse files
fix: problem list API do NOT return ProblemStatus when not logged in (#16)
1 parent 7ec85d2 commit fba4fd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

luogu-api.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export interface TagsResponse {
386386
}
387387

388388
export interface ProblemData {
389-
problem: ProblemDetails & ProblemStatus;
389+
problem: ProblemDetails & Maybe<ProblemStatus>;
390390
contest: ContestSummary | null;
391391
discussions: {
392392
id: number;
@@ -395,7 +395,7 @@ export interface ProblemData {
395395
}[];
396396
bookmarked: boolean;
397397
vjudgeUsername: string | null;
398-
recommendations: (ProblemSummary & ProblemStatus)[];
398+
recommendations: (ProblemSummary & Maybe<ProblemStatus>)[];
399399
lastLanguage: number;
400400
lastCode: string;
401401
privilegedTeams: TeamSummary[];

problems.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</tr>
1414
<tr>
1515
<th align="right">响应主体</th>
16-
<td><code>application/json</code> (<code>DataResponse&lt;{ problems: List&lt;Problem &amp; ProblemStatus&gt;; page: number; }&gt;</code>)</td>
16+
<td><code>application/json</code> (<code>DataResponse&lt;{ problems: List&lt;Problem &amp; Maybe&lt;ProblemStatus&gt;&gt;; page: number; }&gt;</code>)</td>
1717
</tr>
1818
</table>
1919

0 commit comments

Comments
 (0)