import { Request , Response } from "express" ; import * as admin from 'firebase-admin' ; export async function deleteFolder ( req , res ) { const { uid } = req . params ; console . log ( 'Deleting folder' , uid ) ; try { await admin . storage ( ) . bucket ( ) . deleteFiles ( { prefix : `${ uid }/` } ) ; return res . status ( 201 ) . send ( { } ) ; } catch ( err ) { return res . status ( 500 ) . send ( { message : `${ err . code } - ${ err . message }` } ) ; } }