From 178e900fb843f29c70771226109278451fc15087 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 2 Jul 2012 18:14:32 +0200 Subject: o Adding employee search. --- routes/index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'routes') 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); -- cgit v1.2.3