mirror of
https://github.com/moparisthebest/mail
synced 2024-08-13 16:43:47 -04:00
17 lines
426 B
JavaScript
17 lines
426 B
JavaScript
|
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;
|
||
|
});
|