Skip to content

Commit

Permalink
Fix title key for prev/next links
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper authored and nyalldawson committed Apr 1, 2023
1 parent b80bbc4 commit 9fb1cc4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/server/services/wfs3/qgswfs3handlers.cpp
Expand Up @@ -1401,7 +1401,7 @@ void QgsWfs3CollectionsItemsHandler::handleRequest( const QgsServerApiContext &c
json prevLink = selfLink;
prevLink["href"] = QStringLiteral( "%1&offset=%2&limit=%3" ).arg( cleanedUrlAsString ).arg( std::max<long>( 0, limit - offset ) ).arg( limit ).toStdString();
prevLink["rel"] = "prev";
prevLink["name"] = "Previous page";
prevLink["title"] = "Previous page";
data["links"].push_back( prevLink );
}

Expand All @@ -1410,7 +1410,7 @@ void QgsWfs3CollectionsItemsHandler::handleRequest( const QgsServerApiContext &c
json nextLink = selfLink;
nextLink["href"] = QStringLiteral( "%1&offset=%2&limit=%3" ).arg( cleanedUrlAsString ).arg( std::min<long>( matchedFeaturesCount, limit + offset ) ).arg( limit ).toStdString();
nextLink["rel"] = "next";
nextLink["name"] = "Next page";
nextLink["title"] = "Next page";
data["links"].push_back( nextLink );
}

Expand Down
Expand Up @@ -986,9 +986,8 @@ Content-Type: application/geo+json
},
{
"href": "http://server.qgis.org/wfs3/collections/as-areas-short-name/items?crs=http10A10F10Fwww.opengis.net10Fdef10Fcrs10FEPSG10F010F3857&offset=10&limit=10",
"name": "Next page",
"rel": "next",
"title": "Retrieve the features of the collection as GEOJSON",
"title": "Next page",
"type": "application/geo+json"
}
],
Expand Down
Expand Up @@ -986,9 +986,8 @@ Content-Type: application/geo+json
},
{
"href": "http://server.qgis.org/wfs3/collections/as-areas-short-name/items?crs=http10A10F10Fwww.opengis.net10Fdef10Fcrs10FEPSG10F010F4326&offset=10&limit=10",
"name": "Next page",
"rel": "next",
"title": "Retrieve the features of the collection as GEOJSON",
"title": "Next page",
"type": "application/geo+json"
}
],
Expand Down
Expand Up @@ -34,9 +34,8 @@ Content-Type: application/geo+json
},
{
"href": "http://server.qgis.org/wfs3/collections/testlayer èé/items?&offset=1&limit=1",
"name": "Next page",
"rel": "next",
"title": "Retrieve the features of the collection as GEOJSON",
"title": "Next page",
"type": "application/geo+json"
}
],
Expand Down
Expand Up @@ -34,16 +34,14 @@ Content-Type: application/geo+json
},
{
"href": "http://server.qgis.org/wfs3/collections/testlayer èé/items?&offset=0&limit=1",
"name": "Previous page",
"rel": "prev",
"title": "Retrieve the features of the collection as GEOJSON",
"title": "Previous page",
"type": "application/geo+json"
},
{
"href": "http://server.qgis.org/wfs3/collections/testlayer èé/items?&offset=2&limit=1",
"name": "Next page",
"rel": "next",
"title": "Retrieve the features of the collection as GEOJSON",
"title": "Next page",
"type": "application/geo+json"
}
],
Expand Down

0 comments on commit 9fb1cc4

Please sign in to comment.