Skip to content

Commit bf3d525

Browse files
cubapgit-voothehabesmepripri
authored
197 modified and created (#213)
* update metadata (#171) * update metadata * modify route name and db.update * update db.update dependent * cleanup --------- Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu> * quickfix * cleanup * modify db.update to receive one param {data, collection} * nodiff * restore action(data, collection) structure * undiff * Changed Collections Parameter for Save() * Removing /:id put Call * Removing the Limit from express.json() * Removing the Limit from express.json() * getting started with Vault (#190) * getting started with Vault * newer Vault * tests * removing redundant code * proper tests passing * sample Vault * Bryan's refusal to .jsonld makes this not work as expected * loading resources This is incomplete by design. We need to ask Vault to add any resources we want resolved * expanding the Manifest a bit * touch up for merge * touch up for merge --------- Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu> * Current Project IIIF manifest Creation (#187) * Current Project IIIF manifest Creation * Refactored the exportManifest() and endpoint name * Changed the exportManifest() function * TPEN ID error handled * endpoint to move the manifest.json to TPEN-Static-Dev * Changed @id to id * Getting all Ids * Console Clean up * Added env variables * Adding Imports * Adding Imports * Deleting Ids * Updating Logic Added * User not a member cannot change the manifest * Removing project2 * Adding comments to functions * add hotkeys service (#184) * add hotkeys service * hotkey endpoints * aggregate hotkeys during project retrieval * specify hotkey fields to include * cleanup * Update Hotkeys.js * Update ProjectFactory.mjs * Return hotkeys as an Array of Strings * aligning with Class changes * remove create, since .save is not acting correctly * cleanup and drop .post * tests restored no Jest here, just checking exists. * tests and sinon upgrade * no db tests directly * Update exists_unit.test.mjs * putting post back in... * adding create back with safety * adding upsert to accomodate bad errors * Update Hotkeys.js * uncatch to let errors through * expect the errors to come back * switch to jest tests --------- Co-authored-by: cubap <cubap@slu.edu> * hotifx * hotfix for symbols. * delete enabled * Create API.md * collaborators and users * add markdown reader * package for markdown * Update API.md * Update API.md * touch * ah codes * proxy for internal use (#201) * Endpoint to save changes for the new layer (#199) * Adding endpoint to save changes from the layer * Adding New Layer * No Empty Label and no Annotations * Updated new Layer * Adding Items to partOf * Changing id convention * Removing updating layer * Annotation Change * Adding Delete Endpoint * not sure... This type of thing? * Label Change * Added Layer Class * Adding rerum ids to delete and add * Changing tests * Update exists.test.mjs * Changing LayerLabel * Changes AnnotationCollection Structure * Update Pages API * Updating partOf Ids in case of any change * Adding Layer Metadata Label Change * example results as a base for comments, delete these files before merge. * Adding AddLayer Commenting Rest of the APIs * Added DeleteLayer Back * Deleting json files * Updates to the comments * Making Project to Layer Changes * Renaming layerAnnotationCollection * Removing UpdateOne() changes * Removing UpdateOne() changes * Removing UpdateOne() changes * Error Handled for no ProjectID or LayerID * Clear Code * send() instead of json() --------- Co-authored-by: cubap <cubap@slu.edu> Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu> * Update driver.mjs --------- Co-authored-by: Onoja Victor <111019083+git-voo@users.noreply.github.com> Co-authored-by: Bryan Haberberger <bryan.j.haberberger@slu.edu> Co-authored-by: Onoja <onoja.jsdev@gmail.com> Co-authored-by: mepripri <mepripri0712@gmail.com> Co-authored-by: Priyal Patel <52342511+mepripri@users.noreply.github.com>
1 parent 6c34c65 commit bf3d525

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

classes/Layer/__tests__/exists.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ describe('Layer Class looks how we expect it to. #Layer_exists_unit', () => {
1414
expect(layer.updatePages).toBeInstanceOf(Function)
1515
expect(layer.updateLayerMetadata).toBeInstanceOf(Function)
1616
})
17-
})
17+
})

database/driver.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class dbDriver {
8686
* @return The inserted document JSON or error JSON
8787
*/
8888
async save(data, collection) {
89-
console.warn("dbDriver.save() is problematic. https://github.com/CenterForDigitalHumanities/TPEN-services/issues/193")
89+
data._createdAt = new Date()
9090
return this.controller.save(data, collection)
9191
}
9292

@@ -97,6 +97,7 @@ class dbDriver {
9797
*/
9898
async update(data, collection) {
9999
// Note this may just be an alias for save()
100+
data._modifiedAt = new Date()
100101
return this.controller.update(data, collection)
101102
}
102103

project/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,4 +1014,4 @@ router.route("/:projectId/hotkeys").all((_, res) => {
10141014
respondWithError(res, 405, "Improper request method. Use GET, PUT, or DELETE instead")
10151015
})
10161016

1017-
export default router
1017+
export default router

0 commit comments

Comments
 (0)