@wepublish/api
Version:
API core for we.publish.
20 lines • 794 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPeerProfile = void 0;
const tslib_1 = require("tslib");
const getPeerProfile = (hostURL, websiteURL, peerProfile) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
var _a;
// @TODO: move fallback to seed
const profile = (_a = (yield peerProfile.findFirst({}))) !== null && _a !== void 0 ? _a : {
name: '',
themeColor: '#000000',
themeFontColor: '#ffffff',
callToActionURL: '',
callToActionText: [],
callToActionImageID: '',
callToActionImageURL: ''
};
return Object.assign(Object.assign({}, profile), { hostURL, websiteURL });
});
exports.getPeerProfile = getPeerProfile;
//# sourceMappingURL=peer-profile.queries.js.map