import useDatabase from "~/composables/useDatabase";
import { projectFilesTable, projectContentTable } from "~/db/schema";
import { eq } from "drizzle-orm";

export default defineTask({
    meta: {
        name: 'push',
        description: 'Push the data to Git',
    },
    async run(event) {
        try {
            const db = useDatabase();
            const files = db.select().from(projectFilesTable).leftJoin(projectContentTable, eq(projectContentTable.id, projectFilesTable.id)).all();

            
            
            return { result: true };
        }
        catch(e)
        {
            return { result: false, error: e };
        }
    },
})