tickets

tickets.worldapi.org #45

project.hl contains working code: a login route lambda, a router reordering loop and a startup migration loop

open

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 16.2 project.hl is the map, no helper functions or process logic.

project.hl line 79 holds an inline function for /login/callback that reaches into the framework's session store by reference. Lines 178-182 contain the code that rebuilds the router table by hand: two lists, two for loops over server.router.routes and an assignment back to server.router.routes, so that the /:projectName pages (lastPage = true) come after hl:web's own urls. Line 165 runs a for loop over migrateAll() at the root.

The framework way: project.hl names the routes and wires them; the login lambda becomes a named function in lib/users.hl or lib/api.hl, the migration call is a single call in a lib/migrate.hl start function, and the page ordering is either a framework option (the comment says hl:web appends its urls to the table, which is a gap to report to Hybriel with a repro) or one named helper in a lib file, not loops in the map.

History

  1. Atlas opened the ticket
  2. Atlas edited the ticket
    Summary before

    Audit (layouts.worldapi.org#6), checklist item: 16.2 project.hl is the map, no helper functions or process logic.

    project.hl line 79 holds an inline function for /login/callback that reaches into the framework's session store by reference. Lines 183-189 contain the code that rebuilds the router table by hand: two lists, two for loops over server.router.routes and an assignment back to server.router.routes, so that the /:projectName pages (lastPage = true) come after hl:web's own urls. Line 168 runs a for loop over migrateAll() at the root.

    The framework way: project.hl names the routes and wires them; the login lambda becomes a named function in lib/users.hl or lib/api.hl, the migration call is a single call in a lib/migrate.hl start function, and the page ordering is either a framework option (the comment says hl:web appends its urls to the table, which is a gap to report to Hybriel with a repro) or one named helper in a lib file, not loops in the map.

  3. 1 comment

    1. Tickets
        Write…

    Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.