@@ -79,22 +79,22 @@ func main() {
7979
8080 // CRUD Record
8181 // TODO Filters for records ?
82- r .GET ("/collection/:collection" , handlers .ListRecord )
83- r .GET ("/collection/:collection/:id" , handlers .GetRecord )
84- r .POST ("/collection/:collection" , handlers .CreateRecord )
85- r .PATCH ("/collection/:collection/:id" , handlers .UpdateRecord )
86- r .DELETE ("/collection/:collection/:id" , handlers .DeleteRecord )
82+ r .GET ("/api/ collection/:collection" , handlers .ListRecord )
83+ r .GET ("/api/ collection/:collection/:id" , handlers .GetRecord )
84+ r .POST ("/api/ collection/:collection" , handlers .CreateRecord )
85+ r .PATCH ("/api/ collection/:collection/:id" , handlers .UpdateRecord )
86+ r .DELETE ("/api/ collection/:collection/:id" , handlers .DeleteRecord )
8787
8888 // CRUD Collection
89- r .GET ("/collections" , handlers .ListCollection )
90- r .GET ("/collections/:collection" , handlers .GetCollection )
91- r .POST ("/collections/" , handlers .CreateCollection )
92- r .PATCH ("/collections/:collection" , handlers .UpdateCollection )
93- r .DELETE ("/collections/:collection" , handlers .RemoveCollection )
89+ r .GET ("/api/ collections" , handlers .ListCollection )
90+ r .GET ("/api/ collections/:collection" , handlers .GetCollection )
91+ r .POST ("/api/ collections/" , handlers .CreateCollection )
92+ r .PATCH ("/api/ collections/:collection" , handlers .UpdateCollection )
93+ r .DELETE ("/api/ collections/:collection" , handlers .RemoveCollection )
9494
9595 // SuperUser
96- r .POST ("/admin/login" , adminHandler )
97- r .POST ("/admin/check" , adminCheckHandler )
96+ r .POST ("/api/ admin/login" , adminHandler )
97+ r .POST ("/api/ admin/check" , adminCheckHandler )
9898
9999 // Auth Support
100100 // File Upload
0 commit comments