Manage ResearcherProfile

This commit is contained in:
2024-04-18 14:53:17 +02:00
parent da2c0f472d
commit 939b4f5492
6 changed files with 186 additions and 8 deletions

View File

@ -1,8 +1,24 @@
import { restGet, restPost, restDelete, restPatch } from '../restConsumer.js'
import {restGet, restPost, restDelete, restPatch, restPostFile} from '../restConsumer.js'
export async function deleteArticle(id){
await restDelete("/research/" + id)
}
export async function patchArticle(id, data){
await restPatch("/research/" + id, data)
}
export async function uploadPdf(file){
const formData = new FormData();
formData.append("file", file[0]);
return restPostFile("/upload/Research", formData);
}
export async function uploadBibTex(file){
const formData = new FormData();
formData.append("file", file[0]);
return restPostFile("/upload/Research", formData);
}
export async function postResearch(data){
return restPost("/research", data)
}