@axium/storage 0.4.2 → 0.4.3
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.
- package/dist/server.js +1 -7
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -139,13 +139,7 @@ addRoute({
|
|
|
139
139
|
.catch(withError('Could not delete item'));
|
|
140
140
|
if (item.type == 'inode/directory')
|
|
141
141
|
return item;
|
|
142
|
-
|
|
143
|
-
.selectFrom('storage')
|
|
144
|
-
.where('hash', '=', Uint8Array.fromHex(item.hash))
|
|
145
|
-
.select(eb => eb.fn.countAll().as('count'))
|
|
146
|
-
.executeTakeFirstOrThrow();
|
|
147
|
-
if (!Number(count))
|
|
148
|
-
unlinkSync(join(config.storage.data, item.hash));
|
|
142
|
+
unlinkSync(join(config.storage.data, item.id));
|
|
149
143
|
return item;
|
|
150
144
|
},
|
|
151
145
|
});
|