-
Notifications
You must be signed in to change notification settings - Fork 186
feat(api): add new apis #201
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
base: main
Are you sure you want to change the base?
Conversation
|
Task này đóng nhầm, sẽ mở lại task này trong thời gian tới |
…dUserByUsername API
… customizable avatar sizes
src/apis/findUser.ts
Outdated
| const params = { | ||
| phone: phoneNumber, | ||
| avatar_size: 240, | ||
| avatar_size: avatarSize ?? 120, |
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.
@RFS-ADRENO em để avatarSize lúc 120 với 240 để người dùng có thể dễ dàng tùy chỉnh khi muốn lấy thông tin. Còn mặc định set sẵn thì em lấy thì payload avatar_size cũ gán vào là mặc định anh nhé
…sistency across user-related API endpoints
- Convert Node Buffer to Uint8Array for fetch body - Ensures compatibility with Web Fetch API types
src/apis/changeAccountAvatar.ts
Outdated
| method: "POST", | ||
| headers: formData.getHeaders(), | ||
| body: formData.getBuffer(), | ||
| body: formData.getBuffer() as unknown as BodyInit, |
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.
@RFS-ADRENO em không ép BodyInit luôn tại formData.getBuffer() trả về một Buffer Node.js, không thể gán trực tiếp cho BodyInit của TypeScript
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.
@RFS-ADRENO em không ép BodyInit luôn tại formData.getBuffer() trả về một Buffer Node.js, không thể gán trực tiếp cho BodyInit của TypeScript
cái này anh thấy có bị gì đâu nhỉ
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.
@RFS-ADRENO em không ép BodyInit luôn tại formData.getBuffer() trả về một Buffer Node.js, không thể gán trực tiếp cho BodyInit của TypeScript
cái này anh thấy có bị gì đâu nhỉ
của em có hiện lỗi nên fix luôn anh
Type 'Buffer' is not assignable to type 'BodyInit | null | undefined'.
Type 'Buffer' is missing the following properties from type 'URLSearchParams': size, append, delete, get, and 2 more.
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.
@RFS-ADRENO em không ép BodyInit luôn tại formData.getBuffer() trả về một Buffer Node.js, không thể gán trực tiếp cho BodyInit của TypeScript
cái này anh thấy có bị gì đâu nhỉ
của em có hiện lỗi nên fix luôn anh
Type 'Buffer' is not assignable to type 'BodyInit | null | undefined'. Type 'Buffer' is missing the following properties from type 'URLSearchParams': size, append, delete, get, and 2 more.![]()
do phiên bản ts bị sai đấy, em trỏ ts vào bản thư viện sài là được, bấm cái select version

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.
Vậy để em back lại code trên
…s with corresponding types
…ickerSuggestionResponse type from index
…rresponding response types
…Avatar and changeGroupAvatar APIs
| const params = { | ||
| phone: phoneNumber, | ||
| avatar_size: 240, | ||
| avatar_size: isAvatarSizeMax ? 240 : 120, |
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.
ava chỉ có 2 giá trị vậy thôi à em?

feat and fix, refactor, docs
Todo work: