Skip to content

Commit

Permalink
change popular projects logic
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Oct 23, 2024
1 parent 31fafec commit 4d201b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/api/backend-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export default {
getMismatchProjects() {
return API.get('projects/mismatch-projects');
},
getPopularProjects() {
return API.get<getProjects_RV>('projects/popular-projects');
},
createProject(data: createProject_ED) {
return API.post('projects/', data);
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export default defineComponent({
},
getPopularProjects() {
api
.getProjects()
.getPopularProjects()
.then((response) => {
response.data.sort((a, b) => b.users.length - a.users.length);
this.popularProjects = response.data.slice(0, 6);
Expand Down
1 change: 0 additions & 1 deletion src/pinia/modules/stats/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineStore } from "pinia";
import { useProjectStore } from "../project";
import { statProject_t } from "src/api/backend-types";
import { notifyError } from "src/utils/notify";

Expand Down

0 comments on commit 4d201b2

Please sign in to comment.