Skip to content

Conversation

@JustKemForFun
Copy link
Contributor

@JustKemForFun JustKemForFun commented Oct 11, 2025

feat and fix, refactor, docs

Todo work:

@JustKemForFun
Copy link
Contributor Author

JustKemForFun commented Oct 31, 2025

Task này đóng nhầm, sẽ mở lại task này trong thời gian tới

@JustKemForFun JustKemForFun reopened this Nov 21, 2025
const params = {
phone: phoneNumber,
avatar_size: 240,
avatar_size: avatarSize ?? 120,
Copy link
Contributor Author

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é

- Convert Node Buffer to Uint8Array for fetch body
- Ensures compatibility with Web Fetch API types
method: "POST",
headers: formData.getHeaders(),
body: formData.getBuffer(),
body: formData.getBuffer() as unknown as BodyInit,
Copy link
Contributor Author

@JustKemForFun JustKemForFun Nov 25, 2025

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

Copy link
Owner

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ỉ

Copy link
Contributor Author

@JustKemForFun JustKemForFun Nov 26, 2025

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.
image

Copy link
Owner

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.
image

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
image

Copy link
Contributor Author

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

const params = {
phone: phoneNumber,
avatar_size: 240,
avatar_size: isAvatarSizeMax ? 240 : 120,
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants