Page MenuHomeSealhub

single-specification-subject.js
No OneTemporary

single-specification-subject.js

"use strict";
const locreq = require("locreq")(__dirname);
const Subject = locreq("lib/subject/subject.js");
const Errors = locreq("lib/response/error.js");
const SingleSpecificationsSubject = function(app, collection_name) {
const actions = {
show: function(params) {
const collection = app.ChipManager.get_chip(
"collection",
collection_name
);
return collection.get_specification(false);
},
};
this.perform_action = function(context, action_name, params) {
try {
return actions[action_name](params);
} catch (e) {
return Promise.reject(
new Errors.BadSubjectAction(
`Unknown action for SingleSpecificationsSubject: '${action_name}'`
)
);
}
};
};
SingleSpecificationsSubject.prototype = Object.create(Subject.prototype);
SingleSpecificationsSubject.subject_name = "specifications";
module.exports = SingleSpecificationsSubject;

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 17, 03:29 (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
634632
Default Alt Text
single-specification-subject.js (888 B)

Event Timeline