Ship signup sheet, subscribe reminders, cover crop, and theme updates.
Wire real WeChat app config, prefer activity cover over posters, and add admin cover cropping for the home banner. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+15
-1
@@ -33,7 +33,11 @@ const SEED = {
|
||||
],
|
||||
posters: [],
|
||||
signups: [],
|
||||
checkinCodes: []
|
||||
checkinCodes: [],
|
||||
settings: {
|
||||
// 微信公众平台 → 订阅消息 → 选用「活动提醒」类模板后填入模板 ID
|
||||
subscribeTmplId: process.env.WX_SUBSCRIBE_TMPL_ID || ''
|
||||
}
|
||||
}
|
||||
|
||||
const COLLECTIONS = ['users', 'admins', 'adminAllowlist', 'activities', 'posters', 'signups', 'checkinCodes']
|
||||
@@ -49,6 +53,16 @@ function normalize(data) {
|
||||
dirty = true
|
||||
}
|
||||
})
|
||||
if (!data.settings || typeof data.settings !== 'object') {
|
||||
data.settings = { subscribeTmplId: process.env.WX_SUBSCRIBE_TMPL_ID || '' }
|
||||
dirty = true
|
||||
} else if (typeof data.settings.subscribeTmplId !== 'string') {
|
||||
data.settings.subscribeTmplId = process.env.WX_SUBSCRIBE_TMPL_ID || ''
|
||||
dirty = true
|
||||
} else if (!data.settings.subscribeTmplId && process.env.WX_SUBSCRIBE_TMPL_ID) {
|
||||
data.settings.subscribeTmplId = process.env.WX_SUBSCRIBE_TMPL_ID
|
||||
dirty = true
|
||||
}
|
||||
|
||||
// The allowlist is the only source of truth for mini-program admins.
|
||||
data.users.forEach((user) => {
|
||||
|
||||
Reference in New Issue
Block a user