Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions controllers/ArtistsProController/getArtistsProHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Request, Response } from "express";

/**
* Handles GET requests for artists list
* Returns mock artists data
*/
export const getArtistsProHandler = async (
req: Request,
res: Response
): Promise<void> => {
const mockResponse = {
status: "success",
artists: [
{
id: "1",
name: "Artist One",
timestamp: 1234567890,
},
{
id: "2",
name: "Artist Two",
timestamp: 1234567891,
},
{
id: "3",
name: "Artist Three",
timestamp: 1234567892,
},
],
};

res.status(200).json(mockResponse);
};
1 change: 1 addition & 0 deletions controllers/ArtistsProController/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { getArtistsProHandler } from "./getArtistsProHandler";
2 changes: 2 additions & 0 deletions routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as SegmentsController from "./controllers/SegmentsController";
import * as GlobalController from "./controllers/GlobalController";
import { PilotController } from "./controllers/PilotController";
import { getArtistProfileHandler } from "./controllers/ArtistProfileController";
import { getArtistsProHandler } from "./controllers/ArtistsProController";
import { generateImageHandler } from "./controllers/ImageGenerationController";
import { getCommentsHandler } from "./controllers/CommentsController";
import { getArtistSegmentsHandler } from "./controllers/ArtistSegmentsController";
Expand Down Expand Up @@ -95,6 +96,7 @@ routes.get("/image-generation", generateImageHandler as any);

routes.get("/comments", getCommentsHandler as any);

routes.get("/artists/pro", getArtistsProHandler);
routes.get("/artist/segments", getArtistSegmentsHandler as any);
routes.get("/segment/fans", getSegmentFansHandler as any);
routes.get("/artist/socials", getArtistSocialsHandler);
Expand Down