Style fixes
This commit is contained in:
parent
145b3ea766
commit
f984dec95a
@ -63,7 +63,7 @@ class Contributor extends Record {
|
||||
|
||||
updateProfile (contributorId, updateAttr, callOptions = {}) {
|
||||
return this.getById(contributorId).then(async (contributor) => {
|
||||
let updatedContributorAttr = Object.assign(contributor, updateAttr)
|
||||
let updatedContributorAttr = Object.assign(contributor, updateAttr);
|
||||
let updatedContributor = new ContributorSerializer(updatedContributorAttr);
|
||||
|
||||
try { await updatedContributor.validate(); }
|
||||
|
@ -11,4 +11,4 @@ class Record extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Record
|
||||
module.exports = Record;
|
||||
|
@ -31,39 +31,39 @@ class Contributor {
|
||||
} = this;
|
||||
|
||||
let data = {
|
||||
"@context": "https://schema.kosmos.org",
|
||||
"@type": "Contributor",
|
||||
'@context': 'https://schema.kosmos.org',
|
||||
'@type': 'Contributor',
|
||||
kind,
|
||||
name,
|
||||
"accounts": [],
|
||||
'accounts': [],
|
||||
};
|
||||
|
||||
if (url) {
|
||||
data["url"] = url;
|
||||
data['url'] = url;
|
||||
}
|
||||
|
||||
if (github_uid) {
|
||||
data.accounts.push({
|
||||
"site": "github.com",
|
||||
"uid": github_uid,
|
||||
"username": github_username,
|
||||
"url": `https://github.com/${github_username}`,
|
||||
'site': 'github.com',
|
||||
'uid': github_uid,
|
||||
'username': github_username,
|
||||
'url': `https://github.com/${github_username}`,
|
||||
});
|
||||
}
|
||||
|
||||
if (gitea_username) {
|
||||
data.accounts.push({
|
||||
"site": "gitea.kosmos.org",
|
||||
"username": gitea_username,
|
||||
"url": `https://gitea.kosmos.org/${gitea_username}`
|
||||
'site': 'gitea.kosmos.org',
|
||||
'username': gitea_username,
|
||||
'url': `https://gitea.kosmos.org/${gitea_username}`,
|
||||
});
|
||||
}
|
||||
|
||||
if (wiki_username) {
|
||||
data.accounts.push({
|
||||
"site": "wiki.kosmos.org",
|
||||
"username": wiki_username,
|
||||
"url": `https://wiki.kosmos.org/User:${wiki_username}`,
|
||||
'site': 'wiki.kosmos.org',
|
||||
'username': wiki_username,
|
||||
'url': `https://wiki.kosmos.org/User:${wiki_username}`,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -7,4 +7,4 @@ module.exports = function (value, options = {}) {
|
||||
} else {
|
||||
return parseInt(etherValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user