• 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

22.22
/src/http/routes/object/deleteObject.ts
1
import { FastifyInstance } from 'fastify'
2
import { FromSchema } from 'json-schema-to-ts'
3
import { createDefaultSchema, createResponse } from '../../routes-helper'
4
import { AuthenticatedRequest } from '../../types'
5
import { ROUTE_OPERATIONS } from '../operations'
6

7
const deleteObjectParamsSchema = {
2✔
8
  type: 'object',
9
  properties: {
10
    bucketName: { type: 'string', examples: ['avatars'] },
11
    '*': { type: 'string', examples: ['folder/cat.png'] },
12
  },
13
  required: ['bucketName', '*'],
14
} as const
15
const successResponseSchema = {
2✔
16
  type: 'object',
17
  properties: {
18
    message: { type: 'string', examples: ['Successfully deleted'] },
19
  },
20
}
21
interface deleteObjectRequestInterface extends AuthenticatedRequest {
22
  Params: FromSchema<typeof deleteObjectParamsSchema>
23
}
24

25
export default async function routes(fastify: FastifyInstance) {
UNCOV
26
  const summary = 'Delete an object'
×
27

UNCOV
28
  const schema = createDefaultSchema(successResponseSchema, {
×
29
    params: deleteObjectParamsSchema,
30
    summary,
31
    tags: ['object'],
32
  })
33

UNCOV
34
  fastify.delete<deleteObjectRequestInterface>(
×
35
    '/:bucketName/*',
36
    {
37
      schema,
38
      config: {
39
        operation: { type: ROUTE_OPERATIONS.DELETE_OBJECT },
40
      },
41
    },
42
    async (request, response) => {
UNCOV
43
      const { bucketName } = request.params
×
UNCOV
44
      const objectName = request.params['*']
×
45

UNCOV
46
      await request.storage.from(bucketName).deleteObject(objectName)
×
47

UNCOV
48
      return response.status(200).send(createResponse('Successfully deleted'))
×
49
    }
50
  )
51
}
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