fix(report): recommend by measured skin age and align admin results

This commit is contained in:
xsl
2026-10-12 00:23:57 +08:00
parent 7518dc2307
commit 0ec5e5dc32
21 changed files with 3010 additions and 1875 deletions
+4
View File
@@ -37,6 +37,10 @@ const ReportUI = require('../js/report-ui');
payload: { result: { ...SkinScore.MOCK_RESULT, face_maps: { brown_area: 'data:image/png;base64,saved-layer' } }, side: SkinScore.MOCK_SIDE } };
accounts.storeReport(a.data.user.id, snapshot);
assert.deepEqual((await request('/api/reports/Rtest0', null, a.cookie)).data.report, JSON.parse(JSON.stringify(snapshot)));
assert.deepEqual(accounts.reportPresentation(a.data.user.id, 'Rtest0'), JSON.parse(JSON.stringify(presentation)));
assert.equal(accounts.reportPresentation(b.data.user.id, 'Rtest0'), null);
assert.equal(accounts.reportPresentation(a.data.user.id, '../identities'), null);
assert.equal(accounts.reportPresentation('../reports', 'Rtest0'), null);
assert.equal((await request('/api/reports/Rtest0', null, b.cookie)).status, 404);
assert.equal((await request('/api/reports', null, b.cookie)).data.total, 0);
for (let i = 1; i <= 5; i++) accounts.storeReport(a.data.user.id, { ...snapshot, id: 'Rtest' + i });