mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2025-02-17 03:48:25 +00:00
POEditor Contrubuter now fetched
This commit is contained in:
parent
348dc49d5f
commit
9b989e9579
2 changed files with 29 additions and 29 deletions
|
@ -35,7 +35,8 @@ protocol.registerSchemesAsPrivileged([{scheme: 'app', privileges: { secure: true
|
||||||
function createWindow () {
|
function createWindow () {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
win = new BrowserWindow({ width: 1024, height: 768, webPreferences: {
|
win = new BrowserWindow({ width: 1024, height: 768, webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: true,
|
||||||
|
webSecurity: false
|
||||||
} })
|
} })
|
||||||
|
|
||||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||||
|
|
|
@ -11,23 +11,22 @@ const mutations = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const qs = require('querystring')
|
||||||
const actions = {
|
const actions = {
|
||||||
fetchPOEContrib({ commit }) {
|
fetchPOEContrib({ commit }) {
|
||||||
axios({
|
const requestBody = {
|
||||||
method: 'post',
|
id: '342617',
|
||||||
url: 'https://api.poeditor.com/v2/contributors/list',
|
api_token: '5166c4294ff7fb3a82cbdc82958e850e'
|
||||||
headers:
|
}
|
||||||
{
|
|
||||||
"Access-Control-Allow-Origin": "*"
|
|
||||||
},
|
|
||||||
body:
|
|
||||||
{
|
|
||||||
'id' : '342617',
|
|
||||||
'api-token': "5166c4294ff7fb3a82cbdc82958e850e",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
axios.post('https://api.poeditor.com/v2/contributors/list', qs.stringify(requestBody), config)
|
||||||
|
.then((response) => {
|
||||||
console.log(response)
|
console.log(response)
|
||||||
commit('UPDATE_CONTRIBUTORS', response)
|
commit('UPDATE_CONTRIBUTORS', response)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue