Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: problem list API do NOT return ProblemStatus when not logged in #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
0f-0b merged 3 commits into 0f-0b:main from Nikaidou-Shinku:fix/problem_list
Jan 13, 2023
Merged

fix: problem list API do NOT return ProblemStatus when not logged in #16

0f-0b merged 3 commits into 0f-0b:main from Nikaidou-Shinku:fix/problem_list
Jan 13, 2023

Conversation

@Nikaidou-Shinku
Copy link
Contributor

@Nikaidou-Shinku Nikaidou-Shinku commented Jan 13, 2023

No description provided.

Copy link
Contributor Author

ProblemStatus 的两个字段总是同时存在或同时不存在,也许可以考虑使用:

export type ProblemStatus = {
 accepted: boolean;
 submitted: boolean;
} | { };

表示这种关系?我不知道哪种写法更好 🤔

Copy link
Owner

0f-0b commented Jan 13, 2023

未登录时缺字段的情况是Maybe 类型表示的。可以用同样的方法标注 ProblemStatus 的三处使用。

@0f-0b 0f-0b merged commit fba4fd4 into 0f-0b:main Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /