clarify credentials

This commit is contained in:
Arjan Adriaanse 2022-08-01 13:16:59 +02:00
parent d5b38ea3ed
commit abaa3b2ae9
2 changed files with 12 additions and 5 deletions

View File

@ -31,17 +31,24 @@ requires setting environment variables, for example:
```
export WINGS_ENDPOINT=https://api.wings.dev
export WINGS_PROJECT=amsterdam.bij1.org
export WINGS_PROJECT=<PROJECT_ID>
export WINGS_APP_KEY=<APP_KEY>
```
These credentials can be generated by adding an App in the Wings admin
backend.
## `yarn migrate`
Converts all articles and pages that do not exist in WordPress yet and
publishes them along with their media, requires setting environment variables, for example:
publishes them along with their media, requires setting environment
variables, for example:
```
export WP_ENDPOINT=http://localhost:8000/wp-json
export WP_USER=<user>
export WP_PASSWORD=<pw>
export WP_USER=<USERNAME>
export WP_PASSWORD=<APPLICATION_PASSWORD>
```
Note that using this API requires a specific application password
which can be generated from the user management page.

View File

@ -7,7 +7,7 @@ console.log(query);
got.post(process.env.WINGS_ENDPOINT || 'https://api.wings.dev', {
headers: {
"Authorization": "Bearer " + process.env.WINGS_APP_KEY,
"x-wings-app-domain": process.env.WINGS_PROJECT
"X-Wings-Project": process.env.WINGS_PROJECT
},
json: {query}
}).json().then((data) => {