🐛 fix(user): Update notification and verify code settings

This commit is contained in:
web@ppanel
2025-02-14 15:39:25 +07:00
parent e3f9ef6ebe
commit 574b043be6
112 changed files with 500 additions and 502 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';
+26
View File
@@ -323,6 +323,32 @@ export async function updateTosConfig(body: API.TosConfig, options?: { [key: str
});
}
/** Get Verify Code Config GET /v1/admin/system/verify_code_config */
export async function getVerifyCodeConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VerifyCodeConfig }>(
'/v1/admin/system/verify_code_config',
{
method: 'GET',
...(options || {}),
},
);
}
/** Update Verify Code Config PUT /v1/admin/system/verify_code_config */
export async function updateVerifyCodeConfig(
body: API.VerifyCodeConfig,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/system/verify_code_config', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Get verify config GET /v1/admin/system/verify_config */
export async function getVerifyConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.VerifyConfig }>('/v1/admin/system/verify_config', {
+6 -5
View File
@@ -1362,8 +1362,6 @@ declare namespace API {
type UpdateUserNotifySettingRequest = {
user_id: number;
enable_email_notify: boolean;
enable_telegram_notify: boolean;
enable_balance_notify: boolean;
enable_login_notify: boolean;
enable_subscribe_notify: boolean;
@@ -1390,9 +1388,6 @@ declare namespace API {
referer_id: number;
enable: boolean;
is_admin?: boolean;
valid_email: boolean;
enable_email_notify: boolean;
enable_telegram_notify: boolean;
enable_balance_notify: boolean;
enable_login_notify: boolean;
enable_subscribe_notify: boolean;
@@ -1497,6 +1492,12 @@ declare namespace API {
download: number;
};
type VerifyCodeConfig = {
verify_code_expire_time: number;
verify_code_limit: number;
verify_code_interval: number;
};
type VerifyConfig = {
turnstile_site_key: string;
turnstile_secret: string;