An atproto PDS written in Go
at oauth-stuff 26 lines 552 B view raw
1package server 2 3import ( 4 "time" 5 6 "github.com/bluesky-social/indigo/util" 7 "github.com/haileyok/cocoon/models" 8 "github.com/labstack/echo/v4" 9) 10 11func (s *Server) handleAgeAssurance(e echo.Context) error { 12 repo := e.Get("repo").(*models.RepoActor) 13 14 resp := map[string]any{ 15 "state": map[string]any{ 16 "status": "assured", 17 "access": "full", 18 "lastInitiatedAt": time.Now().Format(util.ISO8601), 19 }, 20 "metadata": map[string]any{ 21 "accountCreatedAt": repo.CreatedAt.Format(util.ISO8601), 22 }, 23 } 24 25 return e.JSON(200, resp) 26}