mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
Reworked AddAppShelfItem
Adds: - Advanced Options tab - Changed which ping status codes identify as "Online" - Change if service opens in new tab or not Fixes: - Deluge and Transmission Password requirement
This commit is contained in:
@@ -38,7 +38,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
...(
|
||||
await new Deluge({
|
||||
baseUrl: delugeService.url,
|
||||
password: delugeService.password,
|
||||
password: 'password' in delugeService ? delugeService.password : '',
|
||||
}).getAllData()
|
||||
).torrents
|
||||
);
|
||||
@@ -49,7 +49,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
await new Transmission({
|
||||
baseUrl: transmissionService.url,
|
||||
username: transmissionService.username,
|
||||
password: transmissionService.password,
|
||||
password: 'password' in transmissionService ? transmissionService.password : '',
|
||||
}).getAllData()
|
||||
).torrents
|
||||
);
|
||||
|
||||
@@ -7,10 +7,10 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
await axios
|
||||
.get(url as string)
|
||||
.then((response) => {
|
||||
res.status(200).json(response.data);
|
||||
res.status(response.status).json(response.statusText);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500).json(error);
|
||||
res.status(error.response.status).json(error.response.statusText);
|
||||
});
|
||||
// // Make a request to the URL
|
||||
// const response = await axios.get(url);
|
||||
|
||||
Reference in New Issue
Block a user