mirror of https://github.com/moparisthebest/mail
19 lines
532 B
JavaScript
19 lines
532 B
JavaScript
'use strict';
|
|
|
|
var ngModule = angular.module('woServices');
|
|
ngModule.service('hkp', HKP);
|
|
module.exports = HKP;
|
|
|
|
function HKP(appConfig) {
|
|
this._appConfig = appConfig;
|
|
}
|
|
|
|
/**
|
|
* Return a url of the link to be opened in a new window
|
|
* @param {String} query Either the email address or name
|
|
* @return {String} The url of the hkp query
|
|
*/
|
|
HKP.prototype.getIndexUrl = function(query) {
|
|
var baseUrl = this._appConfig.config.hkpUrl + '/pks/lookup?op=index&search=';
|
|
return baseUrl + encodeURIComponent(query);
|
|
}; |