From b8b7cd6876f72c6de16e47e8f5b5c4a3f5674560 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 24 Mar 2021 20:51:40 +0100 Subject: feat: add repo page --- src/store.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/store.js') 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}`) -- cgit v1.2.3-18-g5258