Replace hardcoded url by current wallabag url

This commit is contained in:
Nicolas Lœuillet 2023-07-30 10:05:59 +02:00
parent e80a169435
commit c1cba72a19
2 changed files with 6 additions and 7 deletions

View file

@ -99,6 +99,9 @@ class DeveloperController extends AbstractController
*/
public function howtoFirstAppAction()
{
return $this->render('@WallabagCore/Developer/howto_app.html.twig');
return $this->render('@WallabagCore/Developer/howto_app.html.twig',
[
'wallabag_url' => $this->getParameter('domain_name'),
]);
}
}

View file

@ -2,10 +2,6 @@
{% block title %}{{ 'developer.howto.page_title'|trans }}{% endblock %}
{% block css %}
{{ parent() }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col s12">
@ -17,7 +13,7 @@
<p>{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}</p>
<p>{{ 'developer.howto.description.paragraph_4'|trans }}</p>
<p>
<pre><code class="language-bash">http POST https://app.wallabag.it/oauth/v2/token \
<pre><code class="language-bash">http POST {{ wallabag_url }}/oauth/v2/token \
grant_type=password \
client_id=12_5um6nz50ceg4088c0840wwc0kgg44g00kk84og044ggkscso0k \
client_secret=3qd12zpeaxes8cwg8c0404g888co4wo8kc4gcw0occww8cgw4k \
@ -46,7 +42,7 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
</p>
<p>{{ 'developer.howto.description.paragraph_6'|trans }}</p>
<p>
<pre><code class="language-bash">http GET https://app.wallabag.it/api/entries.json \
<pre><code class="language-bash">http GET {{ wallabag_url }}/api/entries.json \
"Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"</code></pre>
</p>
<p>{{ 'developer.howto.description.paragraph_7'|trans }}</p>