chore: cleanup orion api to only include essentials
This commit is contained in:
+1
-24
@@ -106,37 +106,14 @@ func main() {
|
||||
mux.Handle("POST /auth/sign-out", withAuth(h.SignOut))
|
||||
mux.Handle("GET /auth/me", withAuth(h.GetCurrentHuman))
|
||||
|
||||
// Bootstrap startup data
|
||||
mux.Handle("GET /startup", withAuth(h.StartupData))
|
||||
|
||||
// Networks
|
||||
mux.Handle("POST /networks", withAuth(h.CreateNetwork))
|
||||
mux.Handle("GET /networks", withAuth(h.ListNetworks))
|
||||
mux.Handle("GET /networks/{id}", withAuth(h.GetNetwork))
|
||||
mux.Handle("POST /networks/{id}/members", withAuth(h.AddMembersToNetwork))
|
||||
// TODO: what about members who are part of streams visibility within this network?
|
||||
mux.Handle("DELETE /networks/{id}/members/{email}", withAuth(h.RemoveMemberFromNetwork))
|
||||
mux.Handle("PUT /networks/{id}/capacity", withAuth(h.SetOpenStreamCapacity))
|
||||
|
||||
// Streams
|
||||
mux.Handle("POST /networks/{network_id}/streams", withAuth(h.CreateStream))
|
||||
mux.Handle("GET /streams/{id}", withAuth(h.GetStream))
|
||||
mux.Handle("PATCH /streams/{id}", withAuth(h.UpdateStream))
|
||||
mux.Handle("POST /streams/{id}/particles", withAuth(h.CreateStreamParticle))
|
||||
mux.Handle("POST /streams/{id}/open", withAuth(h.OpenStream))
|
||||
mux.Handle("POST /streams/{id}/close", withAuth(h.CloseStream))
|
||||
mux.Handle("POST /streams/{id}/members", withAuth(h.AddMembers))
|
||||
mux.Handle("DELETE /streams/{id}/members", withAuth(h.RemoveMembers))
|
||||
|
||||
// Particles
|
||||
mux.Handle("GET /networks/{network_id}/particles", withAuth(h.ListParticles))
|
||||
mux.Handle("GET /particles/{id}", withAuth(h.GetParticle))
|
||||
mux.Handle("PATCH /particles/{id}", withAuth(h.UpdateParticle))
|
||||
mux.Handle("DELETE /particles/{id}", withAuth(h.DeleteParticle))
|
||||
mux.Handle("POST /particles/{id}/seen", withAuth(h.MarkSeen))
|
||||
mux.Handle("POST /particles/{id}/ack", withAuth(h.AckParticle))
|
||||
mux.Handle("GET /particles/{id}/download", withAuth(h.DownloadParticle))
|
||||
mux.Handle("POST /particles/seen", withAuth(h.MarkSeenBatch))
|
||||
mux.Handle("GET /particles/{id}/download", withAuth(h.DownloadParticleMedia))
|
||||
|
||||
// Depot
|
||||
mux.Handle("POST /depot/upload", withAuth(h.PrepareUpload))
|
||||
|
||||
Reference in New Issue
Block a user