-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add request library and cache hook, automatically generate request #18
Conversation
…ests through interface documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 19 changed files in this pull request and generated 2 comments.
Files not reviewed (13)
- package.json: Language not supported
- app/_layout.tsx: Evaluated as low risk
- README.md: Evaluated as low risk
- api/generate/user.ts: Evaluated as low risk
- api/generate/types.ts: Evaluated as low risk
- components/Provider.tsx: Evaluated as low risk
- api/generate/launchScreen.ts: Evaluated as low risk
- app/(tabs)/index.tsx: Evaluated as low risk
- api/enum.ts: Evaluated as low risk
- api/generate/academic.ts: Evaluated as low risk
- api/generate/authorization.ts: Evaluated as low risk
- openapi-ts-request.config.ts: Evaluated as low risk
- utils/user.ts: Evaluated as low risk
Comments suppressed due to low confidence (3)
api/axios.ts:79
- The error handling for JWCH cookie exception is incomplete. Please provide a clear and helpful error message.
// TODO 尝试重新登录并获取cookies和id
hooks/usePersistedQuery.ts:31
- Ensure that queryKey is always a string and properly sanitized to avoid potential issues with special characters.
const persistedData = await AsyncStorage.getItem(queryKey.join('__'));
hooks/usePersistedQuery.ts:40
- [nitpick] Include a more descriptive error message to provide better context for debugging.
console.error(error);
return request(config); | ||
} catch (error: any) { | ||
if (error?.data?.code === ResultEnum.AuthRefreshExpiredCode) { | ||
//TODO 重新输入账号密码登录 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling for expired refresh token is incomplete. Please provide a clear and helpful error message.
//TODO 重新输入账号密码登录 | |
console.error('Refresh token has expired. Please log in again.'); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
queue = []; | ||
return request(config); | ||
} catch (error) { | ||
// TODO 判断是否为密码错误 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling for password error is incomplete. Please provide a clear and helpful error message.
// TODO 判断是否为密码错误 | |
console.error('Password error: Please check your credentials and try again.'); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build failed 了,先 block 住看看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先前无法构建的原因是分配的内存不足。在将 android\gradle.properties
中的 org.gradle.jvmargs
一项调整为 -Xmx8192m -XX:MaxMetaspaceSize=512m
后成功构建。
Resolves #4