Regenerate API schema for track publication, album types and batch uploads
This commit is contained in:
Vendored
+612
-207
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,8 @@ const trackDto: components['schemas']['TrackApplicationResponse'] = {
|
|||||||
updatedAt: '2026-01-03T00:00:00Z',
|
updatedAt: '2026-01-03T00:00:00Z',
|
||||||
ownerUserId: '42',
|
ownerUserId: '42',
|
||||||
tags: [],
|
tags: [],
|
||||||
isExplicit: true
|
isExplicit: true,
|
||||||
|
isPublished: true
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('toTrack', () => {
|
describe('toTrack', () => {
|
||||||
@@ -88,7 +89,8 @@ describe('toAlbum', () => {
|
|||||||
largeImageKeyName: null,
|
largeImageKeyName: null,
|
||||||
createdAt: '',
|
createdAt: '',
|
||||||
updatedAt: 'u',
|
updatedAt: 'u',
|
||||||
coverTrackIds: ['t1']
|
coverTrackIds: ['t1'],
|
||||||
|
type: 'Album'
|
||||||
};
|
};
|
||||||
it('normalizes year and count', () => {
|
it('normalizes year and count', () => {
|
||||||
expect(toAlbum(dto)).toMatchObject({ releaseYear: 2020, trackCount: 5, updatedAt: 'u' });
|
expect(toAlbum(dto)).toMatchObject({ releaseYear: 2020, trackCount: 5, updatedAt: 'u' });
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ export const actions: Actions = {
|
|||||||
]);
|
]);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
putPresigned(urls.audioUploadUrl, Buffer.from(audioBuffer), urls.audioContentType),
|
putPresigned(urls.audioUploadUrl, Buffer.from(audioBuffer), urls.audioContentType),
|
||||||
putPresigned(urls.pictureUploadUrl, Buffer.from(coverBuffer), urls.pictureContentType)
|
urls.pictureUploadUrl && urls.pictureContentType
|
||||||
|
? putPresigned(urls.pictureUploadUrl, Buffer.from(coverBuffer), urls.pictureContentType)
|
||||||
|
: Promise.resolve()
|
||||||
]);
|
]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return fail(502, {
|
return fail(502, {
|
||||||
|
|||||||
Reference in New Issue
Block a user