mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-23 11:33:14 +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 () {
|
||||
// Create the browser window.
|
||||
win = new BrowserWindow({ width: 1024, height: 768, webPreferences: {
|
||||
nodeIntegration: true
|
||||
nodeIntegration: true,
|
||||
webSecurity: false
|
||||
} })
|
||||
|
||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||
|
|
|
@ -11,23 +11,22 @@ const mutations = {
|
|||
},
|
||||
};
|
||||
|
||||
const qs = require('querystring')
|
||||
const actions = {
|
||||
fetchPOEContrib({ commit }) {
|
||||
axios({
|
||||
method: 'post',
|
||||
url: 'https://api.poeditor.com/v2/contributors/list',
|
||||
headers:
|
||||
{
|
||||
"Access-Control-Allow-Origin": "*"
|
||||
},
|
||||
body:
|
||||
{
|
||||
'id' : '342617',
|
||||
'api-token': "5166c4294ff7fb3a82cbdc82958e850e",
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
const requestBody = {
|
||||
id: '342617',
|
||||
api_token: '5166c4294ff7fb3a82cbdc82958e850e'
|
||||
}
|
||||
|
||||
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)
|
||||
commit('UPDATE_CONTRIBUTORS', response)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue