Adjust album/song types

This commit is contained in:
jeffvli
2022-08-02 10:45:27 -07:00
parent e1bc6ecf30
commit d11051bbc1
6 changed files with 93 additions and 148 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { api } from '../lib';
import { AlbumsResponse, BasePaginationRequest } from './types';
import { AlbumResponse, AlbumsResponse, BasePaginationRequest } from './types';
export interface AlbumsRequest extends BasePaginationRequest {
orderBy: string;
@@ -8,7 +8,7 @@ export interface AlbumsRequest extends BasePaginationRequest {
}
const getAlbum = async (params: { id: number }, signal?: AbortSignal) => {
const { data } = await api.get<AlbumsResponse>(`/albums/${params.id}`, {
const { data } = await api.get<AlbumResponse>(`/albums/${params.id}`, {
signal,
});
return data;