summaryrefslogtreecommitdiff
path: root/src/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store.js')
-rw-r--r--src/store.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/store.js b/src/store.js
index 1afad67..1483402 100644
--- a/src/store.js
+++ b/src/store.js
@@ -111,6 +111,16 @@ export default new Vuex.Store({
commit('load_commit', await response.json());
})
},
+ // Get all commits from a repository
+ async get_repo_commits({commit}, data) {
+ commit('loading_state', true)
+ let path = `${this.state.api}/commit/?repository_user=${data.user}&repository_name=${data.name}`
+ await fetch(path)
+ .then(async response => {
+ commit('load_commits', await response.json());
+ })
+ commit('loading_state', false)
+ },
// Get email
async get_email({commit}, data) {
await fetch(`${this.state.api}/email/search/?q=${data.email}`)