fix(wechat): sync MindSpace pages after MP generation and redirect on 401
Memind CI / Test, build, and release guards (push) Failing after 3m31s
Memind CI / Test, build, and release guards (push) Failing after 3m31s
WeChat page delivery now triggers syncUserGeneratedPages so write_file HTML gets page records; public share widget redirects unauthenticated owners to WeChat OAuth instead of only showing an error. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -129,6 +129,10 @@ function createSetup(overrides = {}) {
|
||||
apiSecret: 'secret',
|
||||
mindSpacePages: { id: 'pages' },
|
||||
mindSpacePageLiveEdit: { id: 'live-edit' },
|
||||
syncUserGeneratedPages(userId, options) {
|
||||
calls.push(['sync-user-pages', userId, options]);
|
||||
return Promise.resolve({ created: 1, updated: 0, skipped: 0 });
|
||||
},
|
||||
logger: {
|
||||
log(...args) {
|
||||
calls.push(['log', ...args]);
|
||||
@@ -407,6 +411,13 @@ test('preserves generated-page analytics projection', async () => {
|
||||
.length,
|
||||
1,
|
||||
);
|
||||
const syncCall = setup.calls.find(
|
||||
([name]) => name === 'sync-user-pages',
|
||||
);
|
||||
assert.ok(syncCall);
|
||||
assert.equal(syncCall[1], 'user-1');
|
||||
assert.equal(syncCall[2].sessionId, 'session-1');
|
||||
assert.deepEqual(syncCall[2].onlyRelativePaths, ['public/page.html']);
|
||||
const analyticsCall = setup.calls.find(
|
||||
([name]) => name === 'analytics',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user