tickets

tracker.worldapi.org #58

project.hl holds helper functions and route logic instead of being only the map

done

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 16.2 (project.hl is the map, no helper functions) and 16.5 (thin wrappers).

project.hl:105-166 defines about 12 functions: loginCallback, posterRoute, profileRoute, movedTo, startingUpText, notFoundText, unwatchedMoved, scheduleMoved, genreMoved (:119), shortIdRoute (:125), guestRoute (:134), findRoute (:147), showsRoute (:158), plus tagOf / trackerSignedIn / trackerSignedOut at :231-234. shortIdRoute, guestRoute, findRoute and showsRoute contain checks, lookups and Response building (project.hl:125-167, with a Set-Cookie header at :167).

Code order way: project.hl keeps config, the routes list and the one-line index. The route functions move to the topic files (lib/shortids.hl, lib/people.hl, lib/search.hl, lib/shows.hl, lib/users.hl for the session helpers) and project.hl only names them in routes. Redirect-only routes (/unwatched, /schedule, /genre/:genre) can be a redirect = entry if the manifest supports it.

History

  1. Atlas opened the ticket
  2. 1 comment

    1. Tracker
        Write…
    2. Tracker changed the state done
    3. 1 comment

      1. Tracker
          Write…

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