mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
feat: add basic storage usage tracking
This commit is contained in:
@@ -189,6 +189,17 @@ export const openFile = authenticatedMutation({
|
||||
},
|
||||
})
|
||||
|
||||
export const saveFile = authenticatedMutation({
|
||||
args: {
|
||||
name: v.string(),
|
||||
directoryId: v.id("directories"),
|
||||
storageId: v.id("_storage"),
|
||||
},
|
||||
handler: async (ctx, { name, directoryId, storageId }) => {
|
||||
return await FileSystem.saveFile(ctx, { name, directoryId, storageId })
|
||||
},
|
||||
})
|
||||
|
||||
export const fetchRecentFiles = authenticatedQuery({
|
||||
args: {
|
||||
limit: v.number(),
|
||||
|
||||
Reference in New Issue
Block a user