Make rendus page more interactive
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4c76dd9728
commit
ce6141e6e0
3 changed files with 39 additions and 13 deletions
|
|
@ -15,8 +15,14 @@ export class WorkRepository {
|
|||
this.already_used = already_used == true;
|
||||
}
|
||||
|
||||
async delete() {
|
||||
const res = await fetch(this.id_work?`api/works/${this.id_work}/repositories/${this.id}`:`api/repositories/${this.id}`, {
|
||||
async delete(userid) {
|
||||
let url = this.id_work?`works/${this.id_work}/repositories/${this.id}`:`repositories/${this.id}`;
|
||||
|
||||
if (userid) {
|
||||
url = `users/${userid}/` + url;
|
||||
}
|
||||
|
||||
const res = await fetch("api/" + url, {
|
||||
method: 'DELETE',
|
||||
headers: {'Accept': 'application/json'}
|
||||
});
|
||||
|
|
|
|||
Reference in a new issue