mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 11:57:04 +08:00
feature (admin): admin console
This commit is contained in:
10
client/model/admin.js
Normal file
10
client/model/admin.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { http_post, http_get } from '../helpers';
|
||||
|
||||
export const Admin = {
|
||||
login: function(password = ""){
|
||||
return http_post("/admin/api/session", {password: password});
|
||||
},
|
||||
isAdmin: function(){
|
||||
return http_get("/admin/api/session").then((res) => res.result);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user