Skip to content

Commit

Permalink
Added the content uid to the list of the arguments of the 'IVirtualSt…
Browse files Browse the repository at this point in the history
…oredContentManagerMiddleware' methods
  • Loading branch information
AdrienCastex committed Jun 4, 2017
1 parent 1c1b1b9 commit 4f9cbf1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/manager/VirtualStoredFSManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export declare abstract class VirtualStoredContentManager implements IVirtualSto
allocate(options: any, callback: ReturnCallback<string>): any;
}
export interface IVirtualStoredContentManagerMiddleware {
readStream(stream: Readable, callback: (stream: Readable) => void): any;
writeStream(stream: Writable, callback: (stream: Writable) => void): any;
readStream(uid: string, stream: Readable, callback: (stream: Readable) => void): any;
writeStream(uid: string, stream: Writable, callback: (stream: Writable) => void): any;
}
export declare class SimpleVirtualStoredContentManager extends VirtualStoredContentManager {
storeFolderPath: string;
Expand Down
4 changes: 2 additions & 2 deletions lib/manager/VirtualStoredFSManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var SimpleVirtualStoredContentManager = (function (_super) {
if (!_this.middleware)
callback(null, stream);
else
_this.middleware.readStream(stream, function (s) { return callback(null, s); });
_this.middleware.readStream(contentUid, stream, function (s) { return callback(null, s); });
}
});
};
Expand All @@ -91,7 +91,7 @@ var SimpleVirtualStoredContentManager = (function (_super) {
if (!_this.middleware)
callback(null, stream);
else
_this.middleware.writeStream(stream, function (s) { return callback(null, s); });
_this.middleware.writeStream(contentUid, stream, function (s) { return callback(null, s); });
}
});
};
Expand Down
8 changes: 4 additions & 4 deletions src/manager/VirtualStoredFSManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export abstract class VirtualStoredContentManager implements IVirtualStoredConte

export interface IVirtualStoredContentManagerMiddleware
{
readStream(stream : Readable, callback : (stream : Readable) => void);
writeStream(stream : Writable, callback : (stream : Writable) => void);
readStream(uid : string, stream : Readable, callback : (stream : Readable) => void);
writeStream(uid : string, stream : Writable, callback : (stream : Writable) => void);
}

export class SimpleVirtualStoredContentManager extends VirtualStoredContentManager
Expand Down Expand Up @@ -109,7 +109,7 @@ export class SimpleVirtualStoredContentManager extends VirtualStoredContentManag
if(!this.middleware)
callback(null, stream);
else
this.middleware.readStream(stream, (s) => callback(null, s));
this.middleware.readStream(contentUid, stream, (s) => callback(null, s));
}
})
}
Expand All @@ -127,7 +127,7 @@ export class SimpleVirtualStoredContentManager extends VirtualStoredContentManag
if(!this.middleware)
callback(null, stream);
else
this.middleware.writeStream(stream, (s) => callback(null, s));
this.middleware.writeStream(contentUid, stream, (s) => callback(null, s));
}
})
}
Expand Down

0 comments on commit 4f9cbf1

Please sign in to comment.