Skip to content

Commit

Permalink
Thumbnail diviner updated
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Oct 17, 2023
1 parent c4a8fb6 commit e0b18a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ export class ImageThumbnailDiviner<TParams extends ImageThumbnailDivinerParams =
const limit = payloadLimit ?? 1
const order = payloadOrder ?? 'desc'
const offset = payloadOffset ?? 0
const success = payloadSuccess ?? true
const success = payloadSuccess
const fields: Partial<ImageThumbnailResultQuery> = { limit, offset, order, success, url }
// Default to filtering on 200 status code if success was not supplied
if (payloadSuccess === undefined) fields.status = payloadStatus ?? 200
if (payloadSuccess === true) fields.status = payloadStatus ?? 200
// If success is true and status was supplied, use it
if (success === true && payloadStatus !== undefined) fields.status = payloadStatus
const query = new PayloadBuilder<ImageThumbnailResultQuery>({ schema: PayloadDivinerQuerySchema }).fields(fields).build()
Expand Down

0 comments on commit e0b18a7

Please sign in to comment.