code style

This commit is contained in:
martin-mfg
2025-05-24 12:26:35 +00:00
parent ec6e555a6b
commit 21c4fbb390
2 changed files with 21 additions and 14 deletions
+13 -9
View File
@@ -74,20 +74,24 @@ export default async (req, res) => {
(owners && !safePattern.test(owners))
) {
return res.send(
renderError("Something went wrong", "Username, repository or owner contains unsafe characters", {
title_color,
text_color,
bg_color,
border_color,
theme,
}),
renderError(
"Something went wrong",
"Username, repository or owner contains unsafe characters",
{
title_color,
text_color,
bg_color,
border_color,
theme,
},
),
);
}
try {
const showStats = parseArray(show);
const repositories=parseArray(repos);
const organizations=parseArray(owners);
const repositories = parseArray(repos);
const organizations = parseArray(owners);
const stats = await fetchStats(
username,
parseBoolean(include_all_commits),
+8 -5
View File
@@ -70,11 +70,14 @@ const urlExample = "/api/pin?username=USERNAME&repo=REPO_NAME";
* @param {string} reponame GitHub repository name.
* @returns {Promise<RepositoryData>} Repository data.
*/
const fetchRepo = async (username, reponame, include_prs_authored = false,
include_prs_commented = false,
include_prs_reviewed = false,
include_issues_authored = false,
include_issues_commented = false,
const fetchRepo = async (
username,
reponame,
include_prs_authored = false,
include_prs_commented = false,
include_prs_reviewed = false,
include_issues_authored = false,
include_issues_commented = false,
) => {
let owner = username;
if (reponame && reponame.includes("/")) {