'use strict'; const QUOTA_LIMITED_RESPONSE_CODE = 'QUOTA_LIMITED'; const respondQuotaLimited = (ctx, { message, limitType = 'create', docKind = null, code = QUOTA_LIMITED_RESPONSE_CODE, confirmToken = null, confirmExpireAt = null, } = {}) => { ctx.status = 200; ctx.body = { success: false, quotaLimited: true, code, limitType, docKind, message: message || '操作次数已达上限', confirmToken, confirmExpireAt, }; }; module.exports = { QUOTA_LIMITED_RESPONSE_CODE, respondQuotaLimited, };