mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Remove unnecessary Apprise adapter config field (#95)
This commit is contained in:
@@ -3,7 +3,7 @@ import { getJob } from '../../services/storage/jobStorage.js';
|
|||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
|
|
||||||
export const send = ({ serviceName, newListings, notificationConfig, jobKey }) => {
|
export const send = ({ serviceName, newListings, notificationConfig, jobKey }) => {
|
||||||
const { priority, server } = notificationConfig.find((adapter) => adapter.id === config.id).fields;
|
const { server } = notificationConfig.find((adapter) => adapter.id === config.id).fields;
|
||||||
const job = getJob(jobKey);
|
const job = getJob(jobKey);
|
||||||
const jobName = job == null ? jobKey : job.name;
|
const jobName = job == null ? jobKey : job.name;
|
||||||
const promises = newListings.map((newListing) => {
|
const promises = newListings.map((newListing) => {
|
||||||
@@ -27,15 +27,10 @@ export const config = {
|
|||||||
readme: markdown2Html('lib/notification/adapter/apprise.md'),
|
readme: markdown2Html('lib/notification/adapter/apprise.md'),
|
||||||
description: 'Fredy will send new listings to your Apprise instance.',
|
description: 'Fredy will send new listings to your Apprise instance.',
|
||||||
fields: {
|
fields: {
|
||||||
priority: {
|
|
||||||
type: 'number',
|
|
||||||
label: 'Priority',
|
|
||||||
description: 'The priority of the send notification.',
|
|
||||||
},
|
|
||||||
server: {
|
server: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: 'Server',
|
label: 'Server',
|
||||||
description: 'The server url to send the notification to.',
|
description: 'The server URL to send the notification to.',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
### Apprise Adapter
|
### Apprise Adapter
|
||||||
|
|
||||||
Refer to the [instructions](https://github.com/caronc/apprise-api#installation) on how to set up an Apprise instance and how to configure your preferred notification service.
|
Refer to the [instructions](https://github.com/caronc/apprise-api#installation) on how to set up an Apprise instance and how to configure your preferred notification service.
|
||||||
|
|
||||||
In addition to the Apprise instance, the priority must be defined.
|
|
||||||
Reference in New Issue
Block a user