@@ -23,7 +23,12 @@
{{ $t('form.labels.detected_programming_language') }}:
- {{ result }}
+
+ {{item.language}}
+
@@ -35,7 +40,7 @@
import { detectCode } from '~/api'
import { servicePage } from '~/utils/page'
import { getServiceItem } from '~/contents/services'
- import * as formDefault from '~/contents/form-default/programming-language-detection'
+import * as formDefault from '~/contents/form-default/programming-language-detection'
export default {
data() {
@@ -51,7 +56,7 @@
onSubmit() {
this.processing = true
return detectCode(this.form)
- .then(({ data }) => this.result = data.data.programming_language)
+ .then(({ data }) => this.result = data.code)
.catch(_ => this.$message.error(this.$t('errors.something_wrong')))
.finally(() => this.processing = false)
}