git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
714b5b0
Branches
Tags
develop-client_server
master
typescript
fs-words.git
source
api
actions
translate.ts
[add] api
Christian Fraß
commited
714b5b0
at 2021-03-08 23:03:32
translate.ts
Blame
History
Raw
api.add_action< { language_from : string; language_to : string; token : string; }, Array< { language_from : string; value_from : string; language_to : string; value_to : string; } > > ( { "name": "translate", "execution": async function (input) { const rows : Array<type_row> = await services.concept.get_translations ( input.language_from, input.language_to, input.token ); return ( rows.map ( row => ( { "language_from": row["language_from"], "value_from": row["value_from"], "language_to": row["language_to"], "value_to": row["value_to"], } ) ) ); } } );