style(backend): 格式化代码并修复floating-promises以通过pre-push检查
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user