Profil, merge Master and corrections
This commit is contained in:
@ -1,9 +1,18 @@
|
||||
import { restGet, restPost } from './restConsumer.js'
|
||||
import { getCookie, setCookie } from '@/utils.js'
|
||||
|
||||
export async function login(user, pass, exp){
|
||||
return restPost("/login", {identifier: user, password: pass, expirationDate: exp});
|
||||
}
|
||||
|
||||
export function isLogged(){
|
||||
return getCookie("session_token") != ""
|
||||
}
|
||||
|
||||
export function disconnect(){
|
||||
setCookie("session_token", ";expires= Thu, 01 Jan 1970 00:00:01 GMT")
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a user (tokenless)
|
||||
*
|
||||
|
9
frontend/src/rest/apps.js
Normal file
9
frontend/src/rest/apps.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { restGet } from './restConsumer.js'
|
||||
|
||||
export async function appList(){
|
||||
return restGet("/apps")
|
||||
}
|
||||
|
||||
export async function checkPage(page){
|
||||
return restGet("/apps/" + page)
|
||||
}
|
Reference in New Issue
Block a user