Skip to content

Commit 3b3739e

Browse files
committed
chore: simplify internal endpoints
1 parent bb42f4c commit 3b3739e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
return [
1313
'routes' => [
1414
[
15-
'pattern' => '/localizer/translations',
15+
'pattern' => '/localizer',
1616
'method' => 'get',
1717
'action' => function () use ($path) {
1818
try {
@@ -33,7 +33,7 @@
3333
},
3434
],
3535
[
36-
'pattern' => '/localizer/translations',
36+
'pattern' => '/localizer',
3737
'method' => 'post',
3838
'action' => function () use ($path) {
3939
$translations = kirby()->request()->body()->data();

src/components/PanelLocalizer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ export default {
117117
this.$store.dispatch(LANGUAGES_UPDATE, data);
118118
},
119119
async loadTranslations() {
120-
const translations = await this.$api.get("/localizer/translations");
120+
const translations = await this.$api.get("/localizer");
121121
this.$store.dispatch(TRANSLATIONS_UPDATE, translations);
122122
this.$store.dispatch(PERSIST);
123123
},
124124
async save() {
125-
await this.$api.post("/localizer/translations", this.translations);
125+
await this.$api.post("/localizer", this.translations);
126126
this.$store.dispatch(TRANSLATIONS_UPDATE, this.translations);
127127
this.$store.dispatch(PERSIST);
128128
this.$store.dispatch(DIRTY_CHECK);

0 commit comments

Comments
 (0)