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:
@@ -17,7 +17,7 @@
|
||||
</script>
|
||||
|
||||
<a {href} target="_blank" class="{className} ml-2 hover:no-underline">
|
||||
<Button variant="outline">
|
||||
<Button variant="default">
|
||||
{#if !$isMobile}
|
||||
{#if isLMS}
|
||||
{$t('dashboard.visit_site')}
|
||||
@@ -25,6 +25,6 @@
|
||||
{$t('settings.subheadings.view_site')}
|
||||
{/if}
|
||||
{/if}
|
||||
<ArrowUpRightIcon />
|
||||
<ArrowUpRightIcon class="custom" />
|
||||
</Button>
|
||||
</a>
|
||||
|
||||
+3
-2
@@ -23,13 +23,14 @@
|
||||
|
||||
isLoading = true;
|
||||
try {
|
||||
const response = await classroomio.course.download.certificate.$post({
|
||||
const response = await classroomio.course[':courseId']['download']['certificate']['$post']({
|
||||
param: { courseId: $course.id },
|
||||
json: {
|
||||
theme: `${$course.certificate_theme}`,
|
||||
studentName: `${$profile.fullname}`,
|
||||
courseName: `${$course.title}`,
|
||||
courseDescription: `${$course.description}`,
|
||||
orgLogoUrl: $currentOrg.avatar_url || `${$currentOrgDomain}/logo-512.png`,
|
||||
orgLogoUrl: $currentOrg.avatarUrl || `${$currentOrgDomain}/logo-512.png`,
|
||||
orgName: `${$currentOrg.name}`
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user