better code (api name)

Massimo Melina committed Mar 18, 2023 at 15:45 UTC b0b3f24d3d8f6f049cc862057acd2fc9cfa4bfc6
2 files changed +2 -2
admin/src/LangPage.ts
+1 -1
@@ -10,7 +10,7 @@ import _ from 'lodash'
10 import { alertDialog, toast } from './dialog'
11
12 export default function LangPage() {
13 - const { list, error, connecting, reload } = useApiList('get_langs', undefined, { addId: true })
13 + const { list, error, connecting, reload } = useApiList('list_langs', undefined, { addId: true })
14 if (error)
15 return error
16 return h(Fragment, {},
src/api.lang.ts
+1 -1
@@ -12,7 +12,7 @@ const SUFFIX = '.json'
12
13 const apis: ApiHandlers = {
14
15 - get_langs() {
15 + list_langs() {
16 return new SendListReadable({
17 doAtStart: async list => {
18 for await (let name of glob.stream(code2file('*'))) {