Skip to content

Commit

Permalink
Add RPB ORT ID route, redirect (302) to spatial search (RPB-108)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 17, 2023
1 parent 274038a commit 765123e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/controllers/nwbib/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ public static Promise<Result> search(final String q, final String person,
return result;
}

public static Promise<Result> searchSpatial(final String id, final int from, final int size,
final String format) {
return Promise.pure(found(routes.Application.search("", "", "", "", "", "", "", "",
"https://rpb.lobid.org/spatial#n" + id, "", from, size, "", "", "", false, "", "",
"", "", format)));
}
/**
* @param id The resource ID.
* @param format The requested resource format (html, json).
Expand Down
3 changes: 2 additions & 1 deletion conf/nwbib.routes
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ DELETE /stars/:id controllers.nwbib.Application.unstar(id)
GET /assets/*file controllers.Assets.at(path="/public", file)
GET /robots.txt controllers.Assets.at(path="/public",file="robots.txt")

GET /:id controllers.nwbib.Application.show(id, format ?= "")
GET /o:id controllers.nwbib.Application.searchSpatial(id, from:Int?=0, size:Int?=25, format?="html")
GET /:id controllers.nwbib.Application.show(id, format ?= "")

0 comments on commit 765123e

Please sign in to comment.