oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipo
2
3import (
4 "amadan.net/oficina/equipo/internal/equipo/library"
5 "amadan.net/oficina/equipo/internal/equipo/setup"
6 "net/http"
7)
8
9type TeamLink = setup.TeamLink
10
11func (a *application) teamLinkHandler() *setup.TeamLinkHandler {
12 return &setup.TeamLinkHandler{Store: a.store, Invalid: ErrInvalid, Failure: a.failure,
13 Actor: library.SessionActor(ErrForbidden),
14 Render: func(w http.ResponseWriter, r *http.Request, v setup.TeamLinkView) {
15 // Teams is a Settings section (Paul, 2026-11-11): the
16 // Settings nav beside it, the same width and headings.
17 data, err := a.settingsPage(r, "teams", false)
18 if err != nil {
19 a.failure(w, r, err)
20 return
21 }
22 data.Title = "teams.title"
23 data.Origin = a.origin
24 tasks, err := a.store.Journey(r.Context(), Actor{Address: data.Address})
25 v.SetCurrentTasks(tasks, err)
26 data.Teams = v
27 render(w, "teams", data)
28 },
29 }
30}
31