Skip to content

Commit

Permalink
[plugins/random] remove unnecessary validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
restjohn committed Apr 19, 2024
1 parent 849b86d commit 4029ea2
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions plugins/random/src/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ export class RandomServiceType implements FeedServiceType {
readonly configSchema: JSONSchema4 = {}

async validateServiceConfig(config: Json): Promise<null | InvalidServiceConfigError> {
if (typeof config !== 'string') {
return new FeedsError(ErrInvalidServiceConfig, { invalidKeys: [], config }, 'config must be a url string')
}
try {
new URL(config)
}
catch (err) {
return new FeedsError(ErrInvalidServiceConfig, { invalidKeys: [], config }, 'invalid service url')
}
return null
}

Expand Down

0 comments on commit 4029ea2

Please sign in to comment.