summaryrefslogtreecommitdiff
path: root/src/store.js
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-24 20:51:40 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-24 20:51:40 +0100
commitb8b7cd6876f72c6de16e47e8f5b5c4a3f5674560 (patch)
tree62825a0b60991682d5c6b401b195fe7f833c535d /src/store.js
parent452a0553aec3e7ae6de1421a3d2f18e5dc198d8f (diff)
feat: add repo page
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}`)