Add read-only Noya admin panel with assignments and UX polish.
Ship admin auth, user overview, assessments, chats, assignment filters/export, security hardening, and a separate desktop admin shell with clearer assessment answers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -106,16 +106,23 @@ describe('profile API', () => {
|
||||
const underage = await requestJson(app, '/users/me/profile', {
|
||||
method: 'PATCH',
|
||||
headers: authHeader(token),
|
||||
body: JSON.stringify({ name: 'Sara', age: 17 }),
|
||||
body: JSON.stringify({ name: 'Sara', age: 11 }),
|
||||
});
|
||||
assert.equal(underage.status, 422);
|
||||
|
||||
const overage = await requestJson(app, '/users/me/profile', {
|
||||
const teenOk = await requestJson(app, '/users/me/profile', {
|
||||
method: 'PATCH',
|
||||
headers: authHeader(token),
|
||||
body: JSON.stringify({ name: 'Sara', age: 12 }),
|
||||
});
|
||||
assert.equal(teenOk.status, 200);
|
||||
|
||||
const seniorOk = await requestJson(app, '/users/me/profile', {
|
||||
method: 'PATCH',
|
||||
headers: authHeader(token),
|
||||
body: JSON.stringify({ name: 'Sara', age: 101 }),
|
||||
});
|
||||
assert.equal(overage.status, 422);
|
||||
assert.equal(seniorOk.status, 200);
|
||||
});
|
||||
|
||||
it('does not expose a userId parameter for modifying another user', async (t) => {
|
||||
|
||||
Reference in New Issue
Block a user