Adopted to current basebox BETA
This commit is contained in:
@ -141,7 +141,9 @@ export default {
|
||||
request
|
||||
).then(data => {
|
||||
/* Save the task's id in case it was just created */
|
||||
task.id = data.Task.id;
|
||||
if (!task.id) {
|
||||
task.id = data.createTask.id;
|
||||
}
|
||||
}).catch(e => {
|
||||
const errMsg = `Failed to save task: ${e}`;
|
||||
console.error(errMsg);
|
||||
|
@ -13,7 +13,7 @@ export const store = reactive({
|
||||
userName: "stranger",
|
||||
|
||||
/** base URL of basebox broker host */
|
||||
baseboxHost: process.env.BASEBOX_HOST || "http://127.0.0.1:8080",
|
||||
baseboxHost: import.meta.env.BASEBOX_HOST || "http://127.0.0.1:8080",
|
||||
|
||||
/** basebox session data */
|
||||
session: {},
|
||||
@ -118,8 +118,8 @@ export async function storeInit(session) {
|
||||
}
|
||||
}
|
||||
}`).then(data => {
|
||||
store.lists = data.User.lists ? data.User.lists : [];
|
||||
store.tasks = data.User.tasks ? data.User.tasks : [];
|
||||
store.lists = data.getUser.lists ? data.getUser.lists : [];
|
||||
store.tasks = data.getUser.tasks ? data.getUser.tasks : [];
|
||||
/* create default list if necessary */
|
||||
if (store.lists.length === 0) {
|
||||
gqlQuery(`mutation {
|
||||
|
Reference in New Issue
Block a user