doc opload poc

This commit is contained in:
Timur Ercan
2023-01-23 18:25:14 +01:00
parent 305bd3afb8
commit 1dd0fea158
4 changed files with 43 additions and 34 deletions

View File

@ -68,12 +68,12 @@ const DashboardPage: NextPageWithLayout = () => {
const response: any = await fetch("/api/documents", {
method: "POST",
body,
}).then((response: any) => {
Router.push(
`${NEXT_PUBLIC_WEBAPP_URL}/documents/${
response.json().creadtedDocumentId
}`
);
}).then((response: Response) => {
response.json().then((createdDocumentIdFromBody) => {
Router.push(
`${NEXT_PUBLIC_WEBAPP_URL}/documents/${createdDocumentIdFromBody}`
);
});
});
}
};