mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-14 20:35:32 +01:00
22 lines
448 B
JavaScript
22 lines
448 B
JavaScript
import { http_get, http_post, http_delete } from '../helpers/';
|
|
|
|
class ShareModel {
|
|
constructor(){}
|
|
|
|
all(path = "/"){
|
|
const url = `api/share?path=${path}`;
|
|
return http_get(url);
|
|
}
|
|
|
|
upsert(obj){
|
|
const url = `/api/share/${obj.id}`
|
|
return http_post(url, obj);
|
|
}
|
|
|
|
remove(id){
|
|
const url = `/api/share/${id}`;
|
|
return http_delete(url);
|
|
}
|
|
}
|
|
|
|
export const Share = new ShareModel()
|