Skip to content

Commit 9cf3fa5

Browse files
rakduttacrivetimihai
authored andcommitted
lint flake8
Signed-off-by: rakdutta <[email protected]>
1 parent 628cab1 commit 9cf3fa5

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
@@ -5524,6 +5524,16 @@ async def admin_get_all_resource_ids(
55245524

55255525
This endpoint is used by UI "Select All" helpers to fetch only the IDs
55265526
of resources the requesting user can access (owner, team, or public).
5527+
5528+
Args:
5529+
include_inactive (bool): Whether to include inactive resources in the results.
5530+
db (Session): Database session dependency.
5531+
user: Authenticated user object from dependency injection.
5532+
5533+
Returns:
5534+
dict: A dictionary containing two keys:
5535+
- "resource_ids": List[str] of accessible resource IDs.
5536+
- "count": int number of IDs returned.
55275537
"""
55285538
user_email = get_user_email(user)
55295539
team_service = TeamManagementService(db)

mcpgateway/static/admin.js

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

67206720
try {
6721-
const resp = await fetch(`${window.ROOT_PATH}/admin/resources/ids`);
6721+
const resp = await fetch(
6722+
`${window.ROOT_PATH}/admin/resources/ids`,
6723+
);
67226724
if (!resp.ok) {
67236725
throw new Error("Failed to fetch resource IDs");
67246726
}
@@ -6794,7 +6796,9 @@ function initResourceSelect(
67946796
let allIds = JSON.parse(allIdsInput.value);
67956797
const id = e.target.value;
67966798
if (e.target.checked) {
6797-
if (!allIds.includes(id)) allIds.push(id);
6799+
if (!allIds.includes(id)) {
6800+
allIds.push(id);
6801+
}
67986802
} else {
67996803
allIds = allIds.filter((x) => x !== id);
68006804
}
@@ -6938,7 +6942,9 @@ function initPromptSelect(
69386942
newSelectBtn.textContent = "Selecting all prompts...";
69396943

69406944
try {
6941-
const resp = await fetch(`${window.ROOT_PATH}/admin/prompts/ids`);
6945+
const resp = await fetch(
6946+
`${window.ROOT_PATH}/admin/prompts/ids`,
6947+
);
69426948
if (!resp.ok) {
69436949
throw new Error("Failed to fetch prompt IDs");
69446950
}
@@ -7014,7 +7020,9 @@ function initPromptSelect(
70147020
let allIds = JSON.parse(allIdsInput.value);
70157021
const id = e.target.value;
70167022
if (e.target.checked) {
7017-
if (!allIds.includes(id)) allIds.push(id);
7023+
if (!allIds.includes(id)) {
7024+
allIds.push(id);
7025+
}
70187026
} else {
70197027
allIds = allIds.filter((x) => x !== id);
70207028
}

0 commit comments

Comments
 (0)