• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / storage / 26213785588

21 May 2026 08:08AM UTC coverage: 40.286% (-34.7%) from 74.992%
26213785588

Pull #1118

github

web-flow
Merge fcbe53820 into 322ab2ebb
Pull Request #1118: fix: single callback for memory collector

2182 of 5969 branches covered (36.56%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 2 files covered. (100.0%)

3727 existing lines in 166 files now uncovered.

4335 of 10208 relevant lines covered (42.47%)

35.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

25.0
/src/http/routes/object/deleteObjects.ts
1
import { objectSchema } from '@storage/schemas/object'
2
import { FastifyInstance, FastifyRequest } from 'fastify'
3
import { FromSchema } from 'json-schema-to-ts'
4
import { createDefaultSchema } from '../../routes-helper'
5
import { AuthenticatedRequest } from '../../types'
6
import { ROUTE_OPERATIONS } from '../operations'
7

8
const deleteObjectsParamsSchema = {
2✔
9
  type: 'object',
10
  properties: {
11
    bucketName: { type: 'string', examples: ['avatars'] },
12
  },
13
  required: ['bucketName'],
14
} as const
15
const deleteObjectsBodySchema = {
2✔
16
  type: 'object',
17
  properties: {
18
    prefixes: {
19
      type: 'array',
20
      items: { type: 'string' },
21
      minItems: 1,
22
      examples: [['folder/cat.png', 'folder/morecats.png']],
23
    },
24
  },
25
  required: ['prefixes'],
26
} as const
27
const successResponseSchema = {
2✔
28
  type: 'array',
29
  items: objectSchema,
30
}
31
interface deleteObjectsInterface extends AuthenticatedRequest {
32
  Params: FromSchema<typeof deleteObjectsParamsSchema>
33
  Body: FromSchema<typeof deleteObjectsBodySchema>
34
}
35

36
export default async function routes(fastify: FastifyInstance) {
UNCOV
37
  const summary = 'Delete multiple objects'
×
38

UNCOV
39
  const schema = createDefaultSchema(successResponseSchema, {
×
40
    body: deleteObjectsBodySchema,
41
    params: deleteObjectsParamsSchema,
42
    summary,
43
    tags: ['object'],
44
  })
45

UNCOV
46
  fastify.delete<deleteObjectsInterface>(
×
47
    '/:bucketName',
48
    {
49
      schema,
50
      config: {
51
        operation: { type: ROUTE_OPERATIONS.DELETE_OBJECTS },
52
        resources: (req: FastifyRequest<deleteObjectsInterface>) => {
UNCOV
53
          const { prefixes } = req.body
×
UNCOV
54
          return prefixes.map((prefix) => `${req.params.bucketName}/${prefix}`)
×
55
        },
56
      },
57
    },
58
    async (request, response) => {
UNCOV
59
      const { bucketName } = request.params
×
UNCOV
60
      const prefixes = request.body['prefixes']
×
61

UNCOV
62
      const results = await request.storage.from(bucketName).deleteObjects(prefixes)
×
63

UNCOV
64
      return response.status(200).send(results)
×
65
    }
66
  )
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc