Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Språksamlingane
beta.ordbok.uib.no
Commits
6f3c1244
Commit
6f3c1244
authored
3 years ago
by
Henrik Askjer
Browse files
Options
Downloads
Patches
Plain Diff
Keep old api for search
parent
87efadaf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/DictionaryView.vue
+5
-2
5 additions, 2 deletions
src/components/DictionaryView.vue
with
5 additions
and
2 deletions
src/components/DictionaryView.vue
+
5
−
2
View file @
6f3c1244
...
@@ -137,7 +137,7 @@ function navigate_to_article(self, source) {
...
@@ -137,7 +137,7 @@ function navigate_to_article(self, source) {
}
}
function
navigate_to_search
(
self
,
query
)
{
function
navigate_to_search
(
self
,
query
)
{
axios
.
get
(
self
.
api_
pref
+
'
search?q=
'
+
query
)
axios
.
get
(
self
.
api_
old
+
'
search?q=
'
+
query
)
.
then
(
function
(
response
){
.
then
(
function
(
response
){
self
.
search_results
=
response
.
data
self
.
search_results
=
response
.
data
if
(
!
self
.
search_results
.
length
)
{
if
(
!
self
.
search_results
.
length
)
{
...
@@ -162,7 +162,7 @@ function navigate_to_search(self, query) {
...
@@ -162,7 +162,7 @@ function navigate_to_search(self, query) {
}
}
function
navigate_to_word
(
self
,
word
)
{
function
navigate_to_word
(
self
,
word
)
{
axios
.
get
(
self
.
api_
pref
+
'
suggest?q=
'
+
word
)
axios
.
get
(
self
.
api_
old
+
'
suggest?q=
'
+
word
)
.
then
(
function
(
response
){
.
then
(
function
(
response
){
self
.
search_results
=
response
.
data
.
filter
(
result
=>
result
.
match
==
word
).
sort
(
compare_by_hgno
(
word
))
self
.
search_results
=
response
.
data
.
filter
(
result
=>
result
.
match
==
word
).
sort
(
compare_by_hgno
(
word
))
if
(
!
self
.
search_results
.
length
)
{
if
(
!
self
.
search_results
.
length
)
{
...
@@ -207,6 +207,9 @@ export default {
...
@@ -207,6 +207,9 @@ export default {
api_pref
:
function
()
{
api_pref
:
function
()
{
return
oda_dev
+
'
/
'
+
this
.
lang
+
'
/article/
'
return
oda_dev
+
'
/
'
+
this
.
lang
+
'
/article/
'
},
},
api_old
:
function
()
{
return
api_endpoint
+
'
/
'
+
this
.
lang
+
'
/article/
'
},
get_oda_api
:
function
()
{
get_oda_api
:
function
()
{
return
oda_api
return
oda_api
},
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment