Changeset 8a47b30 for frontend


Ignore:
Timestamp:
02/07/26 18:36:59 (5 months ago)
Author:
Filip Gavrilovski <filipgavrilovski28@…>
Branches:
main
Children:
9c1dcc7
Parents:
dc30259
Message:

add endpoint for fetching aggregated song details and song detail view

Location:
frontend/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/App.tsx

    rdc30259 r8a47b30  
    1717import Nav from "./pages/Nav";
    1818import Register from "./pages/Register";
     19import SongDetail from "./pages/SongDetail";
    1920import UserDetail from "./pages/UserDetail";
    2021
     
    99100                        },
    100101                        {
     102                                path: "/songs/:id",
     103                                element: <SongDetail />,
     104                        },
     105                        {
    101106                                path: "/collection/:type/:id",
    102107                                element: <MusicalCollection />,
  • frontend/src/utils/types.ts

    rdc30259 r8a47b30  
    6464}
    6565
     66export interface SongContribution {
     67        artistName: string;
     68        role: string;
     69}
     70
     71export interface SongReview {
     72        id: {
     73                listenerId: number;
     74                musicalEntityId: number;
     75        };
     76        author: string;
     77        grade: number;
     78        comment: string;
     79}
     80
     81export interface SongDetail extends MusicalEntity {
     82        type: "SONG";
     83        album?: string | null;
     84        link?: string | null;
     85        contributions: SongContribution[];
     86        reviews: SongReview[];
     87}
     88
    6689export interface BasicSong {
    6790        id: number;
Note: See TracChangeset for help on using the changeset viewer.