feat: enhance API route naming conventions and structure
- Added comprehensive guidelines for API route naming and structure in `ROUTE_NAMING_BEST_PRACTICES.md`. - Updated `ARCHITECHTURE.md` to reference the new best practices document. - Refactored course-related routes to follow new naming conventions, including changes to endpoint paths and validation schemas. - Removed the deprecated course clone route and integrated cloning functionality directly into the course routes. - Adjusted various API methods to ensure consistent usage of HTTP methods and parameter structures across the application.
This commit is contained in:
@@ -32,8 +32,8 @@ export class OnboardingApi extends BaseApiWithErrors {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this.execute<typeof classroomio.onboarding.step1.$post>({
|
||||
requestFn: () => classroomio.onboarding.step1.$post({ json: data }),
|
||||
await this.execute<(typeof classroomio.onboarding)['create-org']['$post']>({
|
||||
requestFn: () => classroomio.onboarding['create-org'].$post({ json: data }),
|
||||
logContext: 'submitting organization setup',
|
||||
onSuccess: (result) => {
|
||||
const { organizations } = result.data;
|
||||
@@ -70,8 +70,8 @@ export class OnboardingApi extends BaseApiWithErrors {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this.execute<typeof classroomio.onboarding.step2.$post>({
|
||||
requestFn: () => classroomio.onboarding.step2.$post({ json: data }),
|
||||
await this.execute<(typeof classroomio.onboarding)['update-metadata']['$post']>({
|
||||
requestFn: () => classroomio.onboarding['update-metadata'].$post({ json: data }),
|
||||
logContext: 'submitting organization setup',
|
||||
onSuccess: (result) => {
|
||||
profile.set(result.data);
|
||||
|
||||
Reference in New Issue
Block a user