✨ feat: add redemption code feature to user dashboard
- Add redemption code input component in dashboard - Integrate redemption API endpoint - Add i18n support for Chinese and English - Display redemption section alongside subscriptions
This commit is contained in:
@@ -268,6 +268,24 @@ export async function updateUserRules(
|
||||
);
|
||||
}
|
||||
|
||||
/** Redeem Code POST /v1/public/redemption/ */
|
||||
export async function redeemCode(
|
||||
body: { code: string },
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: { message: string } }>(
|
||||
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/redemption/`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/** Query User Subscribe GET /v1/public/user/subscribe */
|
||||
export async function queryUserSubscribe(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.QueryUserSubscribeListResponse }>(
|
||||
|
||||
Reference in New Issue
Block a user