Skip to content

Commit 23c3a45

Browse files
committed
fix: StorageAdapter - make markKeyFor methods to return void
1 parent d797752 commit 23c3a45

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

adminforth/types/Adapters.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,21 +179,23 @@ export interface StorageAdapter {
179179
* This method should work even if the file does not exist yet (e.g. only presigned URL was generated).
180180
* @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
181181
*/
182-
markKeyForDeletation(key: string): Promise<string>;
182+
markKeyForDeletation(key: string): Promise<void>;
183183

184184

185185
/**
186186
* This method should mark the file to not be deleted.
187187
* This method should be used to cancel the deletion of the file if it was marked for deletion.
188188
* @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
189189
*/
190-
markKeyForNotDeletation(key: string): Promise<string>;
190+
markKeyForNotDeletation(key: string): Promise<void>;
191191

192192

193193
/**
194194
* This method can start needed schedullers, cron jobs, etc. to clean up the storage.
195+
* @param adapterUserUniqueRepresentation - The unique representation of the plugin instance which
196+
* wil use this adapter. Might be handy if you need to distinguish between different instances of the same adapter.
195197
*/
196-
setupLifecycle(): Promise<void>;
198+
setupLifecycle(adapterUserUniqueRepresentation: string): Promise<void>;
197199

198200
/**
199201
* If adapter is configured to publically, this method should return true.

0 commit comments

Comments
 (0)