...
Returns a JSMA voucher for given parameter id.
Warning |
---|
Avoid usage of findByIdIds change whenever a package is reimported. So please avoid using ids whenever possible. Also delivering contents to users by id might make it possible for users to flip through the files (and by that see contents of others possibly) by changing the ids in requests. |
Example
Code Block | ||||
---|---|---|---|---|
| ||||
CartApi.prototype.doAddVoucher = function (id) { [...] var voucherCampaign = vouchers.findById(id); if (!voucherCampaign) { throw new Error("ERROR_VOUCHER_FOR_ID_NOT_FOUND"); } [...] } |
...