1
0
mirror of https://github.com/moparisthebest/mail synced 2024-08-13 16:43:47 -04:00
mail/src/js/dao/privatekey-dao.js

17 lines
426 B
JavaScript
Raw Normal View History

define(function() {
'use strict';
var PrivateKeyDAO = function(restDao) {
this._restDao = restDao;
};
/**
* Persist the user's private key on the server
*/
PrivateKeyDAO.prototype.post = function(privkey, callback) {
var uri = '/privatekey/user/' + privkey.userId + '/key/' + privkey._id;
this._restDao.post(privkey, uri, callback);
};
return PrivateKeyDAO;
});