Skip to content

Commit

Permalink
Merge pull request #7 from BC-SECURITY/dev
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
vinnybod authored Mar 20, 2020
2 parents a74e853 + 2d565e6 commit 9214ceb
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starkiller",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -19,7 +19,7 @@
},
"main": "background.js",
"dependencies": {
"axios": "0.18.0",
"axios": "0.18.1",
"chai-as-promised": "^7.1.1",
"core-js": "^3.4.4",
"electron-store": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/api/listener-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function getListenerOptions(type) {
* Create a listener.
* @param {Object} options the options needed for creating a listener.
*/
export function createListener(options) {
return axios.post('/listeners/http', options)
export function createListener(type, options) {
return axios.post(`/listeners/${type}`, options)
.then(({ data }) => data)
.catch(error => Promise.reject(error.response.data.error));
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/listeners/ListenerForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default {
}
},
async create() {
await this.$store.dispatch('listener/createListener', this.form);
await this.$store.dispatch('listener/createListener', { type: this.listenerType, options: this.form });
},
fieldExists(name) {
return this.fields.filter(el => el.name === name).length > 0;
Expand Down
4 changes: 2 additions & 2 deletions src/store/ListenerModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default {
const listeners = await listenerApi.getListeners();
context.commit('setListeners', listeners);
},
async createListener(context, options) {
await listenerApi.createListener(options);
async createListener(context, { type, options }) {
await listenerApi.createListener(type, options);
context.dispatch('getListeners');
},
async getListenerTypes(context) {
Expand Down
30 changes: 22 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2101,13 +2101,13 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==

[email protected].0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102"
integrity sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=
[email protected].1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3"
integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==
dependencies:
follow-redirects "^1.3.0"
is-buffer "^1.1.5"
follow-redirects "1.5.10"
is-buffer "^2.0.2"

babel-eslint@^10.0.3:
version "10.0.3"
Expand Down Expand Up @@ -3699,6 +3699,13 @@ [email protected], debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
dependencies:
ms "^2.1.1"

debug@=3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"

debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
Expand Down Expand Up @@ -5037,7 +5044,14 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.3.0:
[email protected]:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"

follow-redirects@^1.0.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.10.0.tgz#01f5263aee921c6a54fb91667f08f4155ce169eb"
integrity sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==
Expand Down Expand Up @@ -6054,7 +6068,7 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==

is-buffer@~2.0.3:
is-buffer@^2.0.2, is-buffer@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623"
integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==
Expand Down

0 comments on commit 9214ceb

Please sign in to comment.