Project

General

Profile

Bug #1716

API: url points always to the africaans (af)

Added by Kurt Gerber over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
29 Aug 2017
Due date:
% Done:

90%

Estimated time:
Spent time:
Resolution:

Description

When doing a request on the api with

https://qcat.wocat.net/en/api/v2/questionnaires

Problem:

every resulting questionnaire in the list points to the africaans language (af):

 "count": 4,
    "next": "",
    "previous": "",
    "results": [
        {
            "name": "Recuperación de prácticas tradicionales de producción, como estrategia productiva con resiliencia en Humahuaca",
            "updated": "2017-03-01T09:52:39.264579Z",
            "code": "technologies_1671",
            "url": "/af/wocat/technologies/view/technologies_1671/",
            "details": "/en/api/v2/questionnaires/technologies_1671/" 
        },
        {
            "name": "Ferias comunitarias campesinas como alternativa de comercialización para la mejora en la rentabilidad y mantenimiento de la actividad productiva tradicional",
            "updated": "2017-03-01T08:32:50.231852Z",
            "code": "technologies_1743",
            "url": "/af/wocat/technologies/view/technologies_1743/",
            "details": "/en/api/v2/questionnaires/technologies_1743/" 
        },

Solution:

It should point the the language used in the api request.

#1

Updated by Sebastian Manger over 7 years ago

Two-fold solution:
  • /af/ stems from the elasticsearch index - store language-agnostic urls when indexing questionnaires
  • add language depending on request when returning api-response
#2

Updated by Sebastian Manger over 7 years ago

  • Assignee set to Kurt Gerber
  • % Done changed from 0 to 90

Resolved on develop; request a quick check before going live.

#3

Updated by Sebastian Manger over 7 years ago

  • Status changed from Accepted to Feedback
#4

Updated by Kurt Gerber over 7 years ago

  • Status changed from Feedback to Resolved

Happy whith it.
Please deploy on qcat

#5

Updated by Kurt Gerber over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF