allow translating to any other language

This commit is contained in:
FloatingGhost 2022-08-30 15:43:57 +01:00
parent ef50c63dc7
commit 6440e51b7e
6 changed files with 40 additions and 7 deletions

View file

@ -744,8 +744,9 @@ const getSupportedTranslationlanguages = ({ credentials }) => {
return promisedRequest({ url: AKKOMA_LANGUAGES_URL, credentials })
}
const translateStatus = ({ id, credentials, language }) => {
return promisedRequest({ url: AKKOMA_TRANSLATE_URL(id, language), method: 'GET', credentials })
const translateStatus = ({ id, credentials, language, from }) => {
const queryString = from ? `?from=${from}` : ''
return promisedRequest({ url: AKKOMA_TRANSLATE_URL(id, language) + queryString, method: 'GET', credentials })
.then((data) => {
return data
})