mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-17 17:44:09 +01:00
Merge remote-tracking branch 'origin/main' into integrate/source-errors
# Conflicts: # public/asset-manifest.json # public/css/all.min.css # public/css/style.css # public/partials/anonymize.htm # public/script/vendor.min.js
This commit is contained in:
commit
c014b3c8cf
22 files changed
+444
-92
No files matched your search
@@ -996,6 +996,14 @@ app.get("/api/admin/users/:username", (req, res) => {
|
||||
});
|
||||
app.post("/api/admin/users/:username/ban", (req, res) => res.json({ ok: true, reposQueued: 2 }));
|
||||
app.post("/api/admin/users/:username/:action", ok);
|
||||
app.get("/api/user/repository_picker", (req, res) => {
|
||||
const cursor = Number(req.query.cursor || 0);
|
||||
const query = String(req.query.q || "").toLowerCase();
|
||||
const repos = Array.from({ length: 63 }, (_, id) => ({ id, fullName: `research/project-${String(id + 1).padStart(2, "0")}` }));
|
||||
const matches = repos.filter(repo => repo.fullName.toLowerCase().includes(query));
|
||||
res.json({ items: matches.slice(cursor, cursor + 20), nextCursor: cursor + 20 < matches.length ? cursor + 20 : null });
|
||||
});
|
||||
|
||||
app.get("/api/user/:username/all_repositories", (req, res) => {
|
||||
const u = adminUsers.find((x) => x.username === req.params.username) || adminUsers[0];
|
||||
res.json(githubRepos(u));
|
||||
|
||||
Reference in new issue
Block a user