Discover: fetch discover api && set element(nodes, edges) done
This commit is contained in:
@@ -22,7 +22,7 @@ export default defineStore('loginStore', {
|
||||
* fetch Login For Access Token api
|
||||
*/
|
||||
async signIn() {
|
||||
const api = 'api/oauth/token';
|
||||
const api = '/api/oauth/token';
|
||||
const config = {
|
||||
headers: {
|
||||
// http post 預設的 url 編碼,非 json 格式
|
||||
@@ -38,7 +38,7 @@ export default defineStore('loginStore', {
|
||||
const token = response.data.access_token;
|
||||
|
||||
document.cookie = `luciaToken=${token}`;
|
||||
this.$router.push('/files')
|
||||
this.$router.push('/files');
|
||||
}
|
||||
} catch(error) {
|
||||
this.isInvalid = true;
|
||||
@@ -61,7 +61,7 @@ export default defineStore('loginStore', {
|
||||
* get user detail for 'my-account' api
|
||||
*/
|
||||
async getUserData() {
|
||||
const api = 'api/my-account';
|
||||
const api = '/api/my-account';
|
||||
|
||||
try {
|
||||
const response = await axios.get(api);
|
||||
@@ -74,7 +74,7 @@ export default defineStore('loginStore', {
|
||||
* check login for 'my-account' api
|
||||
*/
|
||||
async checkLogin() {
|
||||
const api = 'api/my-account';
|
||||
const api = '/api/my-account';
|
||||
|
||||
try {
|
||||
const response = await axios.get(api);
|
||||
|
||||
Reference in New Issue
Block a user