func (this *TemplatesHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler) { mux.Get("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Get), )) mux.Delete("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Delete), )) mux.Post("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Post), )) }
func (this *MetadataHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler) { mux.Get("/api/metadata", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Get), )) mux.Put("/api/metadata", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Put), )) mux.Delete("/api/metadata", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Delete), )) }