Skip to content

Commit 92b0319

Browse files
committed
lint flake8
Signed-off-by: rakdutta <[email protected]>
1 parent 8405d2e commit 92b0319

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

mcpgateway/admin.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5519,6 +5519,16 @@ async def admin_get_all_resource_ids(
55195519

55205520
This endpoint is used by UI "Select All" helpers to fetch only the IDs
55215521
of resources the requesting user can access (owner, team, or public).
5522+
5523+
Args:
5524+
include_inactive (bool): Whether to include inactive resources in the results.
5525+
db (Session): Database session dependency.
5526+
user: Authenticated user object from dependency injection.
5527+
5528+
Returns:
5529+
dict: A dictionary containing two keys:
5530+
- "resource_ids": List[str] of accessible resource IDs.
5531+
- "count": int number of IDs returned.
55225532
"""
55235533
user_email = get_user_email(user)
55245534
team_service = TeamManagementService(db)

mcpgateway/static/admin.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6704,7 +6704,9 @@ function initResourceSelect(
67046704
newSelectBtn.textContent = "Selecting all resources...";
67056705

67066706
try {
6707-
const resp = await fetch(`${window.ROOT_PATH}/admin/resources/ids`);
6707+
const resp = await fetch(
6708+
`${window.ROOT_PATH}/admin/resources/ids`,
6709+
);
67086710
if (!resp.ok) {
67096711
throw new Error("Failed to fetch resource IDs");
67106712
}
@@ -6780,7 +6782,9 @@ function initResourceSelect(
67806782
let allIds = JSON.parse(allIdsInput.value);
67816783
const id = e.target.value;
67826784
if (e.target.checked) {
6783-
if (!allIds.includes(id)) allIds.push(id);
6785+
if (!allIds.includes(id)) {
6786+
allIds.push(id);
6787+
}
67846788
} else {
67856789
allIds = allIds.filter((x) => x !== id);
67866790
}
@@ -6924,7 +6928,9 @@ function initPromptSelect(
69246928
newSelectBtn.textContent = "Selecting all prompts...";
69256929

69266930
try {
6927-
const resp = await fetch(`${window.ROOT_PATH}/admin/prompts/ids`);
6931+
const resp = await fetch(
6932+
`${window.ROOT_PATH}/admin/prompts/ids`,
6933+
);
69286934
if (!resp.ok) {
69296935
throw new Error("Failed to fetch prompt IDs");
69306936
}
@@ -7000,7 +7006,9 @@ function initPromptSelect(
70007006
let allIds = JSON.parse(allIdsInput.value);
70017007
const id = e.target.value;
70027008
if (e.target.checked) {
7003-
if (!allIds.includes(id)) allIds.push(id);
7009+
if (!allIds.includes(id)) {
7010+
allIds.push(id);
7011+
}
70047012
} else {
70057013
allIds = allIds.filter((x) => x !== id);
70067014
}

0 commit comments

Comments
 (0)