style(backend): 格式化代码并修复floating-promises以通过pre-push检查

This commit is contained in:
yml2213
2026-09-12 17:46:47 +08:00
parent 8cc3aa2a35
commit fea82bff36
12 changed files with 55 additions and 71 deletions
@@ -71,19 +71,16 @@ router.post(
*/
router.post(
'/pdd/stores/:shopId',
createJsonHandler(
(req) => savePddStore(req.params.shopId, (req.body || {}) as JsonObject),
{
successMessage: '拼多多店铺配置已更新',
errorMessage: '更新拼多多店铺配置失败',
scope: '[admin/platform-config/pdd/stores/:shopId]',
audit: (req) => ({
action: 'platform_pdd_store_updated',
targetType: 'platform_store',
targetId: String(req.params.shopId || ''),
}),
},
),
createJsonHandler((req) => savePddStore(req.params.shopId, (req.body || {}) as JsonObject), {
successMessage: '拼多多店铺配置已更新',
errorMessage: '更新拼多多店铺配置失败',
scope: '[admin/platform-config/pdd/stores/:shopId]',
audit: (req) => ({
action: 'platform_pdd_store_updated',
targetType: 'platform_store',
targetId: String(req.params.shopId || ''),
}),
}),
)
/**
@@ -150,7 +147,7 @@ router.post(
})
if (!result.valid) {
notifyPddCookieExpired({
void notifyPddCookieExpired({
shopId: existingStore.shopId,
shopName: existingStore.shopName,
message: result.message,