Commit 6547bc10 authored by Simonas's avatar Simonas

api adjustments

parent 2e71ca26
......@@ -26,6 +26,7 @@ services:
- "front"
- "back"
volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./wp-content/plugins/biuro-contacts:/var/www/html/wp-content/plugins/biuro-contacts
......@@ -75,7 +76,7 @@ services:
- '80:80'
- '443:443'
volumes:
# - ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/h5bp:/etc/nginx/h5bp
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
......
BiuroPowerBI:$apr1$5nxZLxY0$egUbQUHmxcSfqzIiSsLgx.
biuro_wp_api:$apr1$vvI07kKw$MysnayQWamZReKludVojG.
......@@ -19,10 +19,11 @@ location / {
# auth_basic_user_file /etc/nginx/.htpasswd;
}
location /wp-json/api/ {
location /wp-json/api/v1/contacts {
try_files $uri $uri/ /index.php?$args;
auth_basic "Basic auth";
auth_basic_user_file /var/www/html/.htpasswd;
auth_basic_user_file /etc/nginx/.htpasswd;
# auth_basic_user_file /var/www/html/.htpasswd;
}
location ~ \.php$ {
......
......@@ -123,7 +123,7 @@ document.querySelectorAll('.js-job-action').forEach(function (node) {
});
</script>
<script src="/wp-content/themes/biuro/js/main-a9a206ea.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-19c9eea4.min.js" async></script>
<?php wp_footer(); ?>
</body>
</html>
......@@ -495,7 +495,7 @@ function getDivisions ( $request ) {
add_action( 'rest_api_init', function () {
register_rest_route( 'biuro-api/v1', '/divisions', array(
register_rest_route( 'api/v1', '/divisions', array(
'methods' => WP_REST_Server::READABLE,
'callback' => 'getDivisions',
'args' => array(
......
......@@ -46,7 +46,7 @@ if (module.hot) {
return;
}
fetch('/wp-json/biuro-api/v1/divisions?lang=' + node.dataset.lang)
fetch('/wp-json/api/v1/divisions?lang=' + node.dataset.lang)
.then((t) => t.json())
.then((data) => {
initDivisionsMap(node, data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment