diff --git a/front/app/_editor/course/[courseid]/lecture/[lectureid]/edit/page.tsx b/front/app/_editor/course/[courseid]/lecture/[lectureid]/edit/page.tsx index a10cb3b8..6dde926d 100644 --- a/front/app/_editor/course/[courseid]/lecture/[lectureid]/edit/page.tsx +++ b/front/app/_editor/course/[courseid]/lecture/[lectureid]/edit/page.tsx @@ -8,7 +8,7 @@ import { getLecture } from "@services/courses/lectures"; import AuthProvider from "@components/Security/AuthProvider"; import EditorWrapper from "@components/Editor/EditorWrapper"; import useSWR, { mutate } from "swr"; -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { swrFetcher } from "@services/utils/requests"; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/activity/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/activity/page.tsx index 5a9707f3..83561c96 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/activity/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/activity/page.tsx @@ -1,5 +1,5 @@ "use client"; -import { getAPIUrl, getBackendUrl } from "@services/config"; +import { getAPIUrl, getBackendUrl } from "@services/config/config"; import { swrFetcher } from "@services/utils/requests"; import React from "react"; import { styled } from "styled-components"; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx index 7e766919..da1f8355 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx @@ -2,11 +2,11 @@ import { useRouter } from "next/navigation"; import React from "react"; import { Title } from "@components/UI/Elements/Styles/Title"; -import { createCollection } from "@services/collections"; +import { createCollection } from "@services/courses/collections"; import useSWR from "swr"; -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { swrFetcher } from "@services/utils/requests"; -import { getOrganizationContextInfo } from "@services/orgs"; +import { getOrganizationContextInfo } from "@services/organizations/orgs"; function NewCollection(params : any) { const orgslug = params.params.orgslug; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/collections/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/collections/page.tsx index f2c11b26..c74dd467 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/collections/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/collections/page.tsx @@ -3,8 +3,8 @@ import Link from "next/link"; import React from "react"; import styled from "styled-components"; import { Title } from "@components/UI/Elements/Styles/Title"; -import { deleteCollection } from "@services/collections"; -import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config"; +import { deleteCollection } from "@services/courses/collections"; +import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config/config"; import { swrFetcher } from "@services/utils/requests"; import useSWR, { mutate } from "swr"; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx index ebf1fd6b..f1d7f8a7 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/edit/page.tsx @@ -13,7 +13,7 @@ import { useRouter } from "next/navigation"; import NewChapterModal from "@components/Modals/CourseEdit/NewChapter"; import NewLectureModal from "@components/Modals/CourseEdit/NewLecture"; import { createLecture, createFileLecture } from "@services/courses/lectures"; -import { getOrganizationContextInfo } from "@services/orgs"; +import { getOrganizationContextInfo } from "@services/organizations/orgs"; function CourseEdit(params: any) { const router = useRouter(); diff --git a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/lecture/[lectureid]/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/lecture/[lectureid]/page.tsx index d66a3ec3..868205a3 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/lecture/[lectureid]/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/lecture/[lectureid]/page.tsx @@ -4,7 +4,7 @@ import Link from "next/link"; import React, { useMemo } from "react"; import Layout from "@components/UI/Layout"; import { getLecture } from "@services/courses/lectures"; -import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config"; +import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config/config"; import Canva from "@components/LectureViews/DynamicCanva/DynamicCanva"; import styled from "styled-components"; import { getCourse } from "@services/courses/courses"; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx index c76d2974..f81fdb8c 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/course/[courseid]/page.tsx @@ -4,7 +4,7 @@ import { closeActivity, createActivity } from "@services/courses/activity"; import Link from "next/link"; import React from "react"; import styled from "styled-components"; -import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config"; +import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config/config"; import useSWR, { mutate } from "swr"; import { swrFetcher } from "@services/utils/requests"; diff --git a/front/app/_orgs/[orgslug]/(withmenu)/courses/new/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/courses/new/page.tsx index 8acc5a8a..435bbb24 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/courses/new/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/courses/new/page.tsx @@ -5,8 +5,8 @@ import { Header } from "@components/UI/Header"; import Layout from "@components/UI/Layout"; import { Title } from "@components/UI/Elements/Styles/Title"; import { createNewCourse } from "@services/courses/courses"; -import { getOrganizationContextInfo } from "@services/orgs"; -import { getUriWithOrg } from "@services/config"; +import { getOrganizationContextInfo } from "@services/organizations/orgs"; +import { getUriWithOrg } from "@services/config/config"; const NewCoursePage = (params: any) => { const router = useRouter(); diff --git a/front/app/_orgs/[orgslug]/(withmenu)/courses/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/courses/page.tsx index b661d16f..ae143509 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/courses/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/courses/page.tsx @@ -4,7 +4,7 @@ import { useRouter } from "next/navigation"; import React from "react"; import styled from "styled-components"; import { Title } from "@components/UI/Elements/Styles/Title"; -import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config"; +import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config/config"; import { deleteCourseFromBackend } from "@services/courses/courses"; import useSWR, { mutate } from "swr"; import { swrFetcher } from "@services/utils/requests"; diff --git a/front/app/_orgs/[orgslug]/page.tsx b/front/app/_orgs/[orgslug]/page.tsx index a613b7c8..15c70bda 100644 --- a/front/app/_orgs/[orgslug]/page.tsx +++ b/front/app/_orgs/[orgslug]/page.tsx @@ -1,6 +1,6 @@ "use client"; import { Title } from "@components/UI/Elements/Styles/Title"; -import { getUriWithOrg } from "@services/config"; +import { getUriWithOrg } from "@services/config/config"; import Link from "next/link"; import { usePathname } from "next/navigation"; diff --git a/front/app/_orgs/[orgslug]/settings/organization/general/page.tsx b/front/app/_orgs/[orgslug]/settings/organization/general/page.tsx index a415096b..4ecd1249 100644 --- a/front/app/_orgs/[orgslug]/settings/organization/general/page.tsx +++ b/front/app/_orgs/[orgslug]/settings/organization/general/page.tsx @@ -2,7 +2,7 @@ import React from 'react' import useSWR, { mutate } from "swr"; import { swrFetcher } from "@services/utils/requests"; -import { getAPIUrl } from '@services/config'; +import { getAPIUrl } from '@services/config/config'; import { Field, Form, Formik } from 'formik'; import { updateOrganization } from '@services/settings/org'; diff --git a/front/app/organizations/new/page.tsx b/front/app/organizations/new/page.tsx index ece50646..a645e3d8 100644 --- a/front/app/organizations/new/page.tsx +++ b/front/app/organizations/new/page.tsx @@ -2,7 +2,7 @@ import React from "react"; import Layout from "../../../components/UI/Layout"; import { Title } from "../../../components/UI/Elements/Styles/Title"; -import { createNewOrganization } from "../../../services/orgs"; +import { createNewOrganization } from "../../../services/organizations/orgs"; const Organizations = () => { const [name, setName] = React.useState(""); diff --git a/front/app/organizations/page.tsx b/front/app/organizations/page.tsx index 544f7c52..93ef7e4d 100644 --- a/front/app/organizations/page.tsx +++ b/front/app/organizations/page.tsx @@ -3,10 +3,10 @@ import Link from "next/link"; import React from "react"; import Layout from "../../components/UI/Layout"; import { Title } from "../../components/UI/Elements/Styles/Title"; -import { deleteOrganizationFromBackend } from "@services/orgs"; +import { deleteOrganizationFromBackend } from "@services/organizations/orgs"; import useSWR, { mutate } from "swr"; import { swrFetcher } from "@services/utils/requests"; -import { getAPIUrl, getUriWithOrg } from "@services/config"; +import { getAPIUrl, getUriWithOrg } from "@services/config/config"; const Organizations = () => { const { data : organizations , error } = useSWR(`${getAPIUrl()}orgs/user/page/1/limit/10`, swrFetcher) diff --git a/front/components/Drags/Lecture.tsx b/front/components/Drags/Lecture.tsx index 513b686a..ffb805df 100644 --- a/front/components/Drags/Lecture.tsx +++ b/front/components/Drags/Lecture.tsx @@ -3,7 +3,7 @@ import React from "react"; import { Draggable } from "react-beautiful-dnd"; import { EyeOpenIcon, Pencil2Icon } from '@radix-ui/react-icons' import styled from "styled-components"; -import { getUriWithOrg } from "@services/config"; +import { getUriWithOrg } from "@services/config/config"; function Lecture(props: any) { diff --git a/front/components/Editor/Editor.tsx b/front/components/Editor/Editor.tsx index 4bf794d5..e8945cdc 100644 --- a/front/components/Editor/Editor.tsx +++ b/front/components/Editor/Editor.tsx @@ -9,7 +9,7 @@ import { ToolbarButtons } from "./Toolbar/ToolbarButtons"; import { motion, AnimatePresence } from "framer-motion"; import Image from "next/legacy/image"; import styled from "styled-components"; -import { getBackendUrl } from "../../services/config"; +import { getBackendUrl } from "@services/config/config"; import { SlashIcon } from "@radix-ui/react-icons"; import Avvvatars from "avvvatars-react"; // extensions diff --git a/front/components/Editor/Extensions/Image/ImageBlockComponent.tsx b/front/components/Editor/Extensions/Image/ImageBlockComponent.tsx index f254574c..c3088977 100644 --- a/front/components/Editor/Extensions/Image/ImageBlockComponent.tsx +++ b/front/components/Editor/Extensions/Image/ImageBlockComponent.tsx @@ -3,7 +3,7 @@ import React from "react"; import styled from "styled-components"; import { AlertCircle, AlertTriangle, Image, ImagePlus, Info } from "lucide-react"; import { getImageFile, uploadNewImageFile } from "../../../../services/blocks/Image/images"; -import { getBackendUrl } from "../../../../services/config"; +import { getBackendUrl } from "../../../../services/config/config"; function ImageBlockComponent(props: any) { const [image, setImage] = React.useState(null); diff --git a/front/components/Editor/Extensions/PDF/PDFBlockComponent.tsx b/front/components/Editor/Extensions/PDF/PDFBlockComponent.tsx index 4a6881dd..2ecc8cbc 100644 --- a/front/components/Editor/Extensions/PDF/PDFBlockComponent.tsx +++ b/front/components/Editor/Extensions/PDF/PDFBlockComponent.tsx @@ -3,7 +3,7 @@ import React from "react"; import styled from "styled-components"; import { AlertCircle, AlertTriangle, FileText, Image, ImagePlus, Info } from "lucide-react"; import { getPDFFile, uploadNewPDFFile } from "../../../../services/blocks/Pdf/pdf"; -import { getBackendUrl } from "../../../../services/config"; +import { getBackendUrl } from "../../../../services/config/config"; function PDFBlockComponent(props: any) { const [pdf, setPDF] = React.useState(null); diff --git a/front/components/Editor/Extensions/Video/VideoBlockComponent.tsx b/front/components/Editor/Extensions/Video/VideoBlockComponent.tsx index 9b5ccb45..3faff885 100644 --- a/front/components/Editor/Extensions/Video/VideoBlockComponent.tsx +++ b/front/components/Editor/Extensions/Video/VideoBlockComponent.tsx @@ -2,7 +2,7 @@ import { NodeViewWrapper } from "@tiptap/react"; import { AlertTriangle, Image, Video } from "lucide-react"; import React from "react"; import styled from "styled-components"; -import { getBackendUrl } from "../../../../services/config"; +import { getBackendUrl } from "../../../../services/config/config"; import { uploadNewVideoFile } from "../../../../services/blocks/Video/video"; function VideoBlockComponents(props: any) { diff --git a/front/components/LectureViews/Video/Video.tsx b/front/components/LectureViews/Video/Video.tsx index 4dca7f8d..c8398f13 100644 --- a/front/components/LectureViews/Video/Video.tsx +++ b/front/components/LectureViews/Video/Video.tsx @@ -1,4 +1,4 @@ -import { getBackendUrl } from "@services/config"; +import { getBackendUrl } from "@services/config/config"; import React from "react"; import styled from "styled-components"; diff --git a/front/components/UI/Elements/Menu.tsx b/front/components/UI/Elements/Menu.tsx index 9d888ccc..2a39f59f 100644 --- a/front/components/UI/Elements/Menu.tsx +++ b/front/components/UI/Elements/Menu.tsx @@ -8,7 +8,7 @@ import Link from "next/link"; import Image from "next/image"; import { useRouter, useSearchParams, usePathname } from "next/navigation"; import { headers } from "next/headers"; -import { getOrgFromUri, getUriWithOrg } from "@services/config"; +import { getOrgFromUri, getUriWithOrg } from "@services/config/config"; export const Menu = (params : any) => { const router = useRouter(); diff --git a/front/services/auth/auth.ts b/front/services/auth/auth.ts index 56e61322..2eb90630 100644 --- a/front/services/auth/auth.ts +++ b/front/services/auth/auth.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; interface LoginAndGetTokenResponse { access_token: "string"; diff --git a/front/services/blocks/Image/images.ts b/front/services/blocks/Image/images.ts index 157a74fa..3e8db1ad 100644 --- a/front/services/blocks/Image/images.ts +++ b/front/services/blocks/Image/images.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; export async function uploadNewImageFile(file: any, lecture_id: string) { diff --git a/front/services/blocks/Pdf/pdf.ts b/front/services/blocks/Pdf/pdf.ts index e6b3c21f..5b3b1c22 100644 --- a/front/services/blocks/Pdf/pdf.ts +++ b/front/services/blocks/Pdf/pdf.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; export async function uploadNewPDFFile(file: any, lecture_id: string) { diff --git a/front/services/blocks/Quiz/quiz.ts b/front/services/blocks/Quiz/quiz.ts index e881c624..24e29b96 100644 --- a/front/services/blocks/Quiz/quiz.ts +++ b/front/services/blocks/Quiz/quiz.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; diff --git a/front/services/blocks/Video/video.ts b/front/services/blocks/Video/video.ts index 3fadc936..fc9bccaf 100644 --- a/front/services/blocks/Video/video.ts +++ b/front/services/blocks/Video/video.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; export async function uploadNewVideoFile(file: any, lecture_id: string) { diff --git a/front/services/config.ts b/front/services/config/config.ts similarity index 100% rename from front/services/config.ts rename to front/services/config/config.ts diff --git a/front/services/courses/activity.ts b/front/services/courses/activity.ts index 82e29a6e..d2d41c85 100644 --- a/front/services/courses/activity.ts +++ b/front/services/courses/activity.ts @@ -1,5 +1,5 @@ import { RequestBody } from "@services/utils/requests"; -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; /* This file includes only POST, PUT, DELETE requests diff --git a/front/services/courses/chapters.ts b/front/services/courses/chapters.ts index 68c713f6..5cf8077c 100644 --- a/front/services/courses/chapters.ts +++ b/front/services/courses/chapters.ts @@ -1,5 +1,5 @@ import { initialData } from "../../components/Drags/data"; -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody } from "@services/utils/requests"; /* diff --git a/front/services/collections.ts b/front/services/courses/collections.ts similarity index 87% rename from front/services/collections.ts rename to front/services/courses/collections.ts index 839ba84d..2f213f0b 100644 --- a/front/services/collections.ts +++ b/front/services/courses/collections.ts @@ -1,5 +1,5 @@ -import { getAPIUrl } from "./config"; -import { RequestBody } from "./utils/requests"; +import { getAPIUrl } from "../config/config"; +import { RequestBody } from "../utils/requests"; /* This file includes only POST, PUT, DELETE requests diff --git a/front/services/courses/courses.ts b/front/services/courses/courses.ts index 8f957613..d7307e70 100644 --- a/front/services/courses/courses.ts +++ b/front/services/courses/courses.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; /* diff --git a/front/services/courses/lectures.ts b/front/services/courses/lectures.ts index 4c20f9fd..05458e80 100644 --- a/front/services/courses/lectures.ts +++ b/front/services/courses/lectures.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody, RequestBodyForm } from "@services/utils/requests"; export async function createLecture(data: any, chapter_id: any, org_id: any) { diff --git a/front/services/orgs.ts b/front/services/organizations/orgs.ts similarity index 88% rename from front/services/orgs.ts rename to front/services/organizations/orgs.ts index 44e74cdb..ddd6fde4 100644 --- a/front/services/orgs.ts +++ b/front/services/organizations/orgs.ts @@ -1,5 +1,5 @@ -import { getAPIUrl } from "@services/config"; -import { RequestBody } from "./utils/requests"; +import { getAPIUrl } from "@services/config/config"; +import { RequestBody } from "../utils/requests"; /* This file includes only POST, PUT, DELETE requests diff --git a/front/services/settings/org.ts b/front/services/settings/org.ts index 2f77ee67..10842ca2 100644 --- a/front/services/settings/org.ts +++ b/front/services/settings/org.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody } from "@services/utils/requests"; /* diff --git a/front/services/settings/password.ts b/front/services/settings/password.ts index 3f1c00b4..b4c13bb3 100644 --- a/front/services/settings/password.ts +++ b/front/services/settings/password.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody } from "@services/utils/requests"; /* diff --git a/front/services/settings/profile.ts b/front/services/settings/profile.ts index 8b954c68..bb1a048a 100644 --- a/front/services/settings/profile.ts +++ b/front/services/settings/profile.ts @@ -1,4 +1,4 @@ -import { getAPIUrl } from "@services/config"; +import { getAPIUrl } from "@services/config/config"; import { RequestBody } from "@services/utils/requests"; /*