Reworking actions
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 22s
Music Collection CI Workflow / test (./frontend) (push) Successful in 27s
Music Collection CI Workflow / deploy (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 / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/msuic-collection-backend, ./backend) (push) Has been cancelled
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 22s
Music Collection CI Workflow / test (./frontend) (push) Successful in 27s
Music Collection CI Workflow / deploy (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 / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/msuic-collection-backend, ./backend) (push) Has been cancelled
This commit is contained in:
parent
b5b3774e58
commit
4d4f487fca
@ -1,7 +1,7 @@
|
|||||||
'use server'
|
'use server'
|
||||||
|
|
||||||
export async function getAlbums() {
|
export async function getAlbums() {
|
||||||
return await fetch(`https://api.anatid.net/album/`, {
|
return await fetch("https://api.anatid.net/album", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@ export default function Page() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchAlbums() {
|
async function fetchAlbums() {
|
||||||
const response = await getAlbums();
|
const response = getAlbums();
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setAlbums(data);
|
setAlbums(data);
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ export default function Page() {
|
|||||||
|
|
||||||
const formData = new FormData(event.currentTarget);
|
const formData = new FormData(event.currentTarget);
|
||||||
try {
|
try {
|
||||||
const response = await createAlbum(formData);
|
const response = createAlbum(formData);
|
||||||
const data = response.json();
|
const data = response.json();
|
||||||
console.log(data);
|
console.log(data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user