Skip to content

Commit 543afd6

Browse files
authored
Merge pull request #629 from dzcode-io/chore/lowercased-urls
2 parents 77edcff + 626e142 commit 543afd6

File tree

16 files changed

+26
-27
lines changed

16 files changed

+26
-27
lines changed

api/src/app/endpoints.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import { SearchResponse } from "src/search/types";
2121

2222
// ts-prune-ignore-next
2323
export interface Endpoints {
24-
// @TODO-ZM: lower case the endpoints, curtesy of @Fcmam5
25-
"api:Projects": {
24+
"api:projects": {
2625
response: GetProjectsResponse;
2726
};
2827
"api:projects/for-sitemap": {
@@ -32,14 +31,14 @@ export interface Endpoints {
3231
response: GetProjectNameResponse;
3332
params: { id: string };
3433
};
35-
"api:Projects/:id": {
34+
"api:projects/:id": {
3635
response: GetProjectResponse;
3736
params: { id: string };
3837
};
39-
"api:Contributions": {
38+
"api:contributions": {
4039
response: GetContributionsResponse;
4140
};
42-
"api:Contributions/:id": {
41+
"api:contributions/:id": {
4342
response: GetContributionResponse;
4443
params: { id: string };
4544
};
@@ -50,24 +49,24 @@ export interface Endpoints {
5049
"api:contributions/for-sitemap": {
5150
response: GetContributionsForSitemapResponse;
5251
};
53-
"api:Contributors": {
52+
"api:contributors": {
5453
response: GetContributorsResponse;
5554
};
5655
"api:contributors/for-sitemap": {
5756
response: GetContributorsForSitemapResponse;
5857
};
59-
"api:Contributors/:id": {
58+
"api:contributors/:id": {
6059
response: GetContributorResponse;
6160
params: { id: string };
6261
};
6362
"api:contributors/:id/name": {
6463
response: GetContributorNameResponse;
6564
params: { id: string };
6665
};
67-
"api:MileStones/dzcode": {
66+
"api:milestones/dzcode": {
6867
response: GetMilestonesResponse;
6968
};
70-
"api:Search": {
69+
"api:search": {
7170
response: SearchResponse;
7271
query: [["query", string], ["limit", number]];
7372
};

api/src/contribution/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "./types";
1111

1212
@Service()
13-
@Controller("/Contributions")
13+
@Controller("/contributions")
1414
export class ContributionController {
1515
constructor(private readonly contributionRepository: ContributionRepository) {}
1616

api/src/contributor/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ProjectRepository } from "src/project/repository";
1212
import { ContributionRepository } from "src/contribution/repository";
1313

1414
@Service()
15-
@Controller("/Contributors")
15+
@Controller("/contributors")
1616
export class ContributorController {
1717
constructor(
1818
private readonly contributorRepository: ContributorRepository,

api/src/github/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { Service } from "typedi";
55
import { GetRateLimitResponse } from "./types";
66

77
@Service()
8-
@Controller("/Github")
8+
@Controller("/github")
99
export class GithubController {
1010
constructor(private readonly githubService: GithubService) {}
1111

12-
@Get("/RateLimit")
12+
@Get("/rate-limit")
1313
public async getRateLimitInfo(): Promise<GetRateLimitResponse> {
1414
const { limit, used, ratio } = await this.githubService.getRateLimit();
1515

api/src/milestone/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Service } from "typedi";
55
import { GetMilestonesResponse } from "./types";
66

77
@Service()
8-
@Controller("/Milestones")
8+
@Controller("/milestones")
99
export class MilestoneController {
1010
constructor(private readonly githubService: GithubService) {}
1111

api/src/project/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ContributorRepository } from "src/contributor/repository";
1313
import { ContributionRepository } from "src/contribution/repository";
1414

1515
@Service()
16-
@Controller("/Projects")
16+
@Controller("/projects")
1717
export class ProjectController {
1818
constructor(
1919
private readonly projectRepository: ProjectRepository,

api/src/search/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SearchService } from "./service";
55
import { Service } from "typedi";
66

77
@Service()
8-
@Controller("/Search")
8+
@Controller("/search")
99
export class SearchController {
1010
constructor(private readonly searchService: SearchService) {}
1111

web/src/components/locale/dictionary.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ export const dictionary = {
107107
ar: "أرغب في البرمجة ، من أين أبدأ؟",
108108
},
109109
"faq-topic-2-answer-2": {
110-
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 🔥.`,
111-
ar: `انتقل إلى صفحة [المساهمة](/Contribute) ، سترى قائمة بالمشاريع بالمهام المتاحة لتختار منها ما تريد وتبدأ البرمجة 🔥.`,
110+
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 🔥.`,
111+
ar: `انتقل إلى صفحة [المساهمة](/contribute) ، سترى قائمة بالمشاريع بالمهام المتاحة لتختار منها ما تريد وتبدأ البرمجة 🔥.`,
112112
},
113113
"faq-topic-2-question-3": {
114114
en: "I like the idea, what are the different ways I can contribute to DzCode i/o ?",
115115
ar: "تعجبني الفكرة ، ما هي الطرق المختلفة التي يمكنني من خلالها المساهمة في DzCode i/o؟",
116116
},
117117
"faq-topic-2-answer-3": {
118118
en: `
119-
Besides the open tasks on [/Contribute](/Contribute) page, you can also contribute to DzCode i/o by:
119+
Besides the open tasks on [/contribute](/contribute) page, you can also contribute to DzCode i/o by:
120120
121121
- Adding your open-source projects to the dzcode.io website.
122122
`,

web/src/redux/actions/contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const fetchContributionAction =
1313
}
1414
try {
1515
dispatch(contributionPageSlice.actions.set({ contribution: null }));
16-
const { contribution } = await fetchV2("api:Contributions/:id", { params: { id } });
16+
const { contribution } = await fetchV2("api:contributions/:id", { params: { id } });
1717
dispatch(contributionPageSlice.actions.set({ contribution }));
1818
} catch (error) {
1919
dispatch(contributionPageSlice.actions.set({ contribution: "ERROR" }));

web/src/redux/actions/contributions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const fetchContributionsListAction =
88
(): ThunkAction<void, AppState, unknown, Action> => async (dispatch) => {
99
try {
1010
dispatch(contributionsPageSlice.actions.set({ contributionsList: null }));
11-
const { contributions } = await fetchV2("api:Contributions", {});
11+
const { contributions } = await fetchV2("api:contributions", {});
1212

1313
dispatch(contributionsPageSlice.actions.set({ contributionsList: contributions }));
1414
} catch (error) {

0 commit comments

Comments
 (0)