cleanup and cache the paste response 5 mins
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m13s
Publish Docker Image / docker (ubuntu-latest) (push) Successful in 51s

This commit is contained in:
Lee
2024-04-23 16:37:33 +01:00
parent 29c483aeb1
commit 4cfc368f96
4 changed files with 16 additions and 16 deletions

View File

@ -16,6 +16,7 @@ export default function Home(): ReactElement {
return;
}
// Upload the paste to the server
const response = await fetch(
`${process.env.NEXT_PUBLIC_API_ENDPOINT}/upload`,
{
@ -27,6 +28,7 @@ export default function Home(): ReactElement {
},
);
// Redirect to the new paste
const data = await response.json();
window.location.href = `/${data.id}`;
}