From 626e1420120f9f94a871bdbffeb089a808f0c0aa Mon Sep 17 00:00:00 2001 From: Zakaria Mansouri Date: Tue, 31 Dec 2024 00:37:49 +0100 Subject: [PATCH] refactor: standardize controller and dictionary endpoint names to lowercase --- api/src/contribution/controller.ts | 2 +- api/src/contributor/controller.ts | 2 +- api/src/github/controller.ts | 4 ++-- api/src/milestone/controller.ts | 2 +- api/src/project/controller.ts | 2 +- api/src/search/controller.ts | 2 +- web/src/components/locale/dictionary.ts | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/src/contribution/controller.ts b/api/src/contribution/controller.ts index 1db22f444..b42b20efb 100644 --- a/api/src/contribution/controller.ts +++ b/api/src/contribution/controller.ts @@ -10,7 +10,7 @@ import { } from "./types"; @Service() -@Controller("/Contributions") +@Controller("/contributions") export class ContributionController { constructor(private readonly contributionRepository: ContributionRepository) {} diff --git a/api/src/contributor/controller.ts b/api/src/contributor/controller.ts index 9416b0fd9..fccc872b3 100644 --- a/api/src/contributor/controller.ts +++ b/api/src/contributor/controller.ts @@ -12,7 +12,7 @@ import { ProjectRepository } from "src/project/repository"; import { ContributionRepository } from "src/contribution/repository"; @Service() -@Controller("/Contributors") +@Controller("/contributors") export class ContributorController { constructor( private readonly contributorRepository: ContributorRepository, diff --git a/api/src/github/controller.ts b/api/src/github/controller.ts index add90ae0f..cd172004a 100644 --- a/api/src/github/controller.ts +++ b/api/src/github/controller.ts @@ -5,11 +5,11 @@ import { Service } from "typedi"; import { GetRateLimitResponse } from "./types"; @Service() -@Controller("/Github") +@Controller("/github") export class GithubController { constructor(private readonly githubService: GithubService) {} - @Get("/RateLimit") + @Get("/rate-limit") public async getRateLimitInfo(): Promise { const { limit, used, ratio } = await this.githubService.getRateLimit(); diff --git a/api/src/milestone/controller.ts b/api/src/milestone/controller.ts index c475642c7..fa1bd1c6c 100644 --- a/api/src/milestone/controller.ts +++ b/api/src/milestone/controller.ts @@ -5,7 +5,7 @@ import { Service } from "typedi"; import { GetMilestonesResponse } from "./types"; @Service() -@Controller("/Milestones") +@Controller("/milestones") export class MilestoneController { constructor(private readonly githubService: GithubService) {} diff --git a/api/src/project/controller.ts b/api/src/project/controller.ts index bf9cb922f..916801a7f 100644 --- a/api/src/project/controller.ts +++ b/api/src/project/controller.ts @@ -13,7 +13,7 @@ import { ContributorRepository } from "src/contributor/repository"; import { ContributionRepository } from "src/contribution/repository"; @Service() -@Controller("/Projects") +@Controller("/projects") export class ProjectController { constructor( private readonly projectRepository: ProjectRepository, diff --git a/api/src/search/controller.ts b/api/src/search/controller.ts index 1af74d213..cdcd10f97 100644 --- a/api/src/search/controller.ts +++ b/api/src/search/controller.ts @@ -5,7 +5,7 @@ import { SearchService } from "./service"; import { Service } from "typedi"; @Service() -@Controller("/Search") +@Controller("/search") export class SearchController { constructor(private readonly searchService: SearchService) {} diff --git a/web/src/components/locale/dictionary.ts b/web/src/components/locale/dictionary.ts index 489c6c22d..9c273153b 100644 --- a/web/src/components/locale/dictionary.ts +++ b/web/src/components/locale/dictionary.ts @@ -107,8 +107,8 @@ export const dictionary = { ar: "أرغب في البرمجة ، من أين أبدأ؟", }, "faq-topic-2-answer-2": { - en: `Go to [/Contribute](/Contribute) page, you will see a list of projects with available tasks for you to pick from whatever you like and start programming 🔥.`, - ar: `انتقل إلى صفحة [المساهمة](/Contribute) ، سترى قائمة بالمشاريع بالمهام المتاحة لتختار منها ما تريد وتبدأ البرمجة 🔥.`, + en: `Go to [/contribute](/contribute) page, you will see a list of projects with available tasks for you to pick from whatever you like and start programming 🔥.`, + ar: `انتقل إلى صفحة [المساهمة](/contribute) ، سترى قائمة بالمشاريع بالمهام المتاحة لتختار منها ما تريد وتبدأ البرمجة 🔥.`, }, "faq-topic-2-question-3": { en: "I like the idea, what are the different ways I can contribute to DzCode i/o ?", @@ -116,7 +116,7 @@ export const dictionary = { }, "faq-topic-2-answer-3": { en: ` -Besides the open tasks on [/Contribute](/Contribute) page, you can also contribute to DzCode i/o by: +Besides the open tasks on [/contribute](/contribute) page, you can also contribute to DzCode i/o by: - Adding your open-source projects to the dzcode.io website. `,