fix: merging from the main
This commit is contained in:
@ -44,9 +44,10 @@ import ProjectComp from "../components/ProjectComponent.vue";
|
||||
import PendingProjectComponent from "@/components/PendingProjectComponent.vue";
|
||||
import AddProjectForm from "@/components/AddProjectForm.vue";
|
||||
import PendingRequestsManager from "@/components/PendingRequestsManager.vue";
|
||||
|
||||
import { createAdmin } from "@/services/Apis/Admin";
|
||||
import Project from "@/ApiClasses/Project";
|
||||
import UserEntrepreneur from "@/ApiClasses/UserEntrepreneur";
|
||||
import UserAdmin from "@/ApiClasses/UserAdmin";
|
||||
//import AllEntrep from "../components/AllEntrep.vue";
|
||||
const projects = ref<
|
||||
{
|
||||
@ -69,6 +70,18 @@ const fallbackProjects = [
|
||||
},
|
||||
];
|
||||
|
||||
const createFirstAdmin = () => {
|
||||
createAdmin(
|
||||
(response) => {
|
||||
console.log("Admin créé avec succès :", response.data);
|
||||
},
|
||||
(error) => {
|
||||
console.error("Erreur lors de la création de l'admin :", error.message);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const fetchProjects = () => {
|
||||
getAdminProjects(
|
||||
(response: AxiosResponse) => {
|
||||
@ -122,6 +135,7 @@ const fetchProjects = () => {
|
||||
};
|
||||
|
||||
onMounted(fetchProjects);
|
||||
onMounted(createFirstAdmin);
|
||||
|
||||
const pendingProjects = ref<Project[]>([]);
|
||||
|
||||
|
Reference in New Issue
Block a user