@@ -93,7 +93,7 @@ async def as_form(cls, id: int = Form(...), name: str = Form(...)):
93
93
94
94
# -- Routes --
95
95
96
- @router .post ("/" , response_class = RedirectResponse )
96
+ @router .post ("/create" , name = "create_organization " , response_class = RedirectResponse )
97
97
def create_organization (
98
98
org : OrganizationCreate = Depends (OrganizationCreate .as_form ),
99
99
user : User = Depends (get_authenticated_user ),
@@ -132,7 +132,7 @@ def create_organization(
132
132
return RedirectResponse (url = f"/profile" , status_code = 303 )
133
133
134
134
135
- @router .put ("/{org_id}" , response_class = RedirectResponse )
135
+ @router .post ("/update/ {org_id}" , name = "update_organization " , response_class = RedirectResponse )
136
136
def update_organization (
137
137
org : OrganizationUpdate = Depends (OrganizationUpdate .as_form ),
138
138
user : User = Depends (get_user_with_relations ),
@@ -162,7 +162,7 @@ def update_organization(
162
162
return RedirectResponse (url = f"/profile" , status_code = 303 )
163
163
164
164
165
- @router .delete ("/{org_id}" , response_class = RedirectResponse )
165
+ @router .post ("/delete/ {org_id}" , name = "delete_organization " , response_class = RedirectResponse )
166
166
def delete_organization (
167
167
org_id : int ,
168
168
user : User = Depends (get_user_with_relations ),
0 commit comments