import define from "../../define.js";
import { deleteFile } from "../../../../services/drive/delete-file.js";
import { DriveFiles } from "../../../../models/index.js";
export const meta = {
    tags: [
        "admin"
    ],
    requireCredential: true,
    requireModerator: true
};
export const paramDef = {
    type: "object",
    properties: {
        userId: {
            type: "string",
            format: "misskey:id"
        }
    },
    required: [
        "userId"
    ]
};
export default define(meta, paramDef, async (ps, me)=>{
    const files = await DriveFiles.findBy({
        userId: ps.userId
    });
    for (const file of files){
        deleteFile(file);
    }
});
