@axium/storage 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +4 -4
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -326,7 +326,7 @@ addRoute({
326
326
  const userId = event.params.id;
327
327
  await checkAuthForUser(event, userId);
328
328
  const [items, usage, limits] = await Promise.all([
329
- database.selectFrom('storage').where('userId', '=', userId).where('trashedAt', '==', null).selectAll().execute(),
329
+ database.selectFrom('storage').where('userId', '=', userId).where('trashedAt', '!=', null).selectAll().execute(),
330
330
  currentUsage(userId),
331
331
  getLimits(userId),
332
332
  ]).catch(withError('Could not fetch data'));
@@ -344,8 +344,8 @@ addRoute({
344
344
  const items = await database
345
345
  .selectFrom('storage')
346
346
  .where('userId', '=', userId)
347
- .where('trashedAt', '==', null)
348
- .where('parentId', '==', null)
347
+ .where('trashedAt', '!=', null)
348
+ .where('parentId', '=', null)
349
349
  .selectAll()
350
350
  .execute()
351
351
  .catch(withError('Could not get storage items'));
@@ -362,7 +362,7 @@ addRoute({
362
362
  await checkAuthForUser(event, userId);
363
363
  const items = await database
364
364
  .selectFrom('storage')
365
- .where('trashedAt', '==', null)
365
+ .where('trashedAt', '!=', null)
366
366
  .where(({ and, not, exists, selectFrom }) => {
367
367
  const existsInAcl = (column) => exists(selectFrom('acl.storage')
368
368
  .whereRef('itemId', '=', `storage.${column}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/storage",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "description": "User file storage for Axium",
6
6
  "funding": {