Skip to content

Commit

Permalink
Use common relativeUri validator for path
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenFrankel committed Mar 25, 2024
1 parent d6409e8 commit 610b149
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/bitbucket/bitbucket-last-commit.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Joi from 'joi'
import { age as ageColor } from '../color-formatters.js'
import { BaseJsonService, NotFound, pathParam, queryParam } from '../index.js'
import { formatDate } from '../text-formatters.js'
import { relativeUri } from '../validators.js'

const schema = Joi.object({
values: Joi.array().items({
Expand All @@ -10,7 +11,7 @@ const schema = Joi.object({
}).required()

const queryParamSchema = Joi.object({
path: Joi.string().uri({ relativeOnly: true }),
path: relativeUri,
}).required()

export default class BitbucketLastCommit extends BaseJsonService {
Expand Down

0 comments on commit 610b149

Please sign in to comment.