Fixes
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been cancelled
Music Collection CI Workflow / deploy (push) Has been cancelled
Music Collection CI Workflow / test (./backend) (push) Has been cancelled
Some checks failed
Music Collection CI Workflow / test (./frontend) (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been cancelled
Music Collection CI Workflow / deploy (push) Has been cancelled
Music Collection CI Workflow / test (./backend) (push) Has been cancelled
This commit is contained in:
parent
d66d476acb
commit
62a08dd6be
@ -4,6 +4,7 @@ export async function getAlbums() {
|
|||||||
return fetch('https://api.anatid.net/album', {
|
return fetch('https://api.anatid.net/album', {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
next: { revalidate: 3600 }
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
@ -18,6 +19,7 @@ export async function getAlbum(id: number) {
|
|||||||
return fetch(`https://api.anatid.net/album/${id}`, {
|
return fetch(`https://api.anatid.net/album/${id}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
next: { revalidate: 3600 }
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
@ -96,6 +98,7 @@ export async function getSongs() {
|
|||||||
return fetch("https://api.anatid.net/song/", {
|
return fetch("https://api.anatid.net/song/", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
next: { revalidate: 3600 }
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
@ -110,6 +113,7 @@ export async function getSong(id: number) {
|
|||||||
return fetch(`https://api.anatid.net/song/${id}`, {
|
return fetch(`https://api.anatid.net/song/${id}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
next: { revalidate: 3600 }
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
@ -150,7 +154,7 @@ export async function updateSong(formData: FormData) {
|
|||||||
const title = formData.get('title');
|
const title = formData.get('title');
|
||||||
const duration = formData.get('duration');
|
const duration = formData.get('duration');
|
||||||
const trackNumber = formData.get('trackNumber');
|
const trackNumber = formData.get('trackNumber');
|
||||||
return fetch(`https://api.anatid.net/song/${album-id}`, {
|
return fetch(`https://api.anatid.net/song/${albumId}`, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
@ -159,7 +163,8 @@ export async function updateSong(formData: FormData) {
|
|||||||
title: title,
|
title: title,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
trackNumber: trackNumber,
|
trackNumber: trackNumber,
|
||||||
})
|
}),
|
||||||
|
next: { revalidate: 3600 }
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user