Adding track number to song edit form
All checks were successful
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m50s
Music Collection CI Workflow / deploy (push) Successful in 2s
Music Collection CI Workflow / test (./backend) (push) Successful in 27s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 49s
All checks were successful
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m50s
Music Collection CI Workflow / deploy (push) Successful in 2s
Music Collection CI Workflow / test (./backend) (push) Successful in 27s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 49s
This commit is contained in:
parent
1e9663a36e
commit
136c13887d
@ -88,6 +88,7 @@ export async function createSong(formData: FormData) {
|
||||
const albumId = formData.get('album-id');
|
||||
const title = formData.get('title');
|
||||
const duration = formData.get('duration');
|
||||
const trackNumber = formData.get('trackNumber');
|
||||
return fetch("https://api.anatid.net/song", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
@ -95,6 +96,7 @@ export async function createSong(formData: FormData) {
|
||||
albumId: albumId,
|
||||
title: title,
|
||||
duration: duration,
|
||||
trackNumber: trackNumber,
|
||||
})
|
||||
}).then(response => {
|
||||
return response.json();
|
||||
@ -106,6 +108,7 @@ export async function updateSong(formData: FormData) {
|
||||
const albumId = formData.get('album-id');
|
||||
const title = formData.get('title');
|
||||
const duration = formData.get('duration');
|
||||
const trackNumber = formData.get('trackNumber');
|
||||
return fetch(`https://api.anatid.net/song/${id}`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
@ -114,6 +117,7 @@ export async function updateSong(formData: FormData) {
|
||||
albumId: albumId,
|
||||
title: title,
|
||||
duration: duration,
|
||||
trackNumber: trackNumber,
|
||||
})
|
||||
}).then(response => {
|
||||
return response.json();
|
||||
|
@ -96,6 +96,11 @@ export default function Page() {
|
||||
<label htmlFor="album-artist">Duration (seconds)</label><input type="text" name="artist" id="song-duration" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="six columns">
|
||||
<label htmlFor="album-title">Track Number</label><input type="text" name="trackNumber" id="song-trackNumber" />
|
||||
</div>
|
||||
</div>
|
||||
<Button variant="primary" type="submit">Create</Button>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user