aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/routes/index.js b/routes/index.js
index 969c0b8..44feab4 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -225,8 +225,17 @@ exports.employees = function(req, res) {
}
var c = {collection: {
href: res.urlgenerator.employees(req.query),
- items: mapEmployees(res, rs2.rows),
- links: links
+ links: links,
+ queries: [{
+ href: res.urlgenerator.employees(),
+ rel: 'search',
+ name: 'employee-search',
+ prompt: 'Employee search',
+ data: [
+ { name: "name" }
+ ]
+ }],
+ items: mapEmployees(res, rs2.rows)
}};
res.contentType('application/vnd.collection+json');
res.send(JSON.stringify(collection_json.fromObject(c)), 200);