-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from nulib/deploy/staging
Deploy to production
- Loading branch information
Showing
9 changed files
with
293 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const nulLogo = { | ||
id: "https://iiif.dc.library.northwestern.edu/iiif/2/00000000-0000-0000-0000-000000000003/full/pct:50/0/default.webp", | ||
type: "Image", | ||
format: "image/webp", | ||
height: 139, | ||
width: 1190, | ||
}; | ||
|
||
const provider = { | ||
id: "https://www.library.northwestern.edu/", | ||
type: "Agent", | ||
label: { none: ["Northwestern University Libraries"] }, | ||
homepage: [ | ||
{ | ||
id: "https://dc.library.northwestern.edu/", | ||
type: "Text", | ||
label: { | ||
none: [ | ||
"Northwestern University Libraries Digital Collections Homepage", | ||
], | ||
}, | ||
format: "text/html", | ||
language: ["en"], | ||
}, | ||
], | ||
logo: [nulLogo], | ||
}; | ||
|
||
module.exports = { nulLogo, provider }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
const { doSearch } = require("./search-runner"); | ||
const { wrap } = require("./middleware"); | ||
|
||
const getCollections = async (event) => { | ||
event.pathParameters.models = "collections"; | ||
event.body = { query: { match_all: {} } }; | ||
return doSearch(event, { includeToken: false }); | ||
}; | ||
|
||
const getCollectionsAsIiif = async (event) => { | ||
event.pathParameters.models = "collections"; | ||
event.body = { query: { match_all: {} } }; | ||
event.queryStringParameters.collectionLabel = | ||
"Northwestern University Libraries Digital Collections"; | ||
event.queryStringParameters.collectionSummary = | ||
"Explore digital resources from the Northwestern University Library collections – including letters, photographs, diaries, maps, and audiovisual materials."; | ||
|
||
return doSearch(event, { | ||
includeToken: false, | ||
parameterOverrides: { as: "iiif" }, | ||
}); | ||
}; | ||
|
||
/** | ||
* A simple function to get Collections | ||
*/ | ||
exports.handler = wrap(async (event) => { | ||
event.pathParameters.models = "collections"; | ||
event.body = { query: { match_all: {} } }; | ||
return doSearch(event, { includeToken: false }); | ||
return event.queryStringParameters?.as === "iiif" | ||
? getCollectionsAsIiif(event) | ||
: getCollections(event); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.