-// { type, endpoint, data, toIds, transaction }
-function _createRequest (options, callback) {
- const type = options.type
- const endpoint = options.endpoint
- const data = options.data
- const toIds = options.toIds
- const transaction = options.transaction
-
- const pods = []
-
- // If there are no destination pods abort
- if (toIds.length === 0) return callback(null)
-
- toIds.forEach(function (toPod) {
- pods.push(db.Pod.build({ id: toPod }))
- })
-
- const createQuery = {
- endpoint,
- request: {
- type: type,
- data: data
- }
- }
-
- const dbRequestOptions = {
- transaction
- }
-
- return db.Request.create(createQuery, dbRequestOptions).asCallback(function (err, request) {
- if (err) return callback(err)
+function createVideoQaduRequest (options, callback) {
+ if (!callback) callback = function () {}