feat(accounts): add accounts and shared accounts call
This commit is contained in:
@@ -1,15 +1,32 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
export const logWithGoogle = (oauthToken) => {
|
||||
const headers = {
|
||||
const headers = {
|
||||
"Authorization": "Bearer "+oauthToken
|
||||
};
|
||||
return Vue.axios.post("http://localhost:8081/users", "{}",{headers})
|
||||
return Vue.axios.get("http://localhost:8081/users",{headers}).then(response => {return response.data})
|
||||
}
|
||||
|
||||
export const getUserInformation = (oauthToken) => {
|
||||
const headers = {
|
||||
export const getAccounts = (oauthToken, userId) => {
|
||||
const headers = {
|
||||
"Authorization": "Bearer "+oauthToken
|
||||
};
|
||||
return Vue.axios.get("http://localhost:8081/configuration", {headers})
|
||||
};
|
||||
return Vue.axios.get("http://localhost:8081/users/"+userId+"/accountsgc", {headers}).then(response => {console.log(response);return response.data})
|
||||
}
|
||||
|
||||
export const getSharedAccounts = (oauthToken, userId) => {
|
||||
const headers = {
|
||||
"Authorization": "Bearer "+oauthToken
|
||||
};
|
||||
return Vue.axios.get("http://localhost:8081/users/"+userId+"/sharedaccounts", {headers}).then(response => {console.log(response);return response.data})
|
||||
}
|
||||
|
||||
export const createAccount = (oauthToken, userId, account) => {
|
||||
const headers = {
|
||||
"Authorization": "Bearer " + oauthToken
|
||||
};
|
||||
return Vue.axios.post("http://localhost:8081/configuration", account, {headers}).then(response => {
|
||||
console.log(response);
|
||||
return response.data
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user