banger
This commit is contained in:
parent
525447be3a
commit
8dd368a8e4
@ -74,6 +74,20 @@ class ClipIndex extends EventEmitter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete(filename) {
|
||||||
|
|
||||||
|
const clipEntry = this.index[filename];
|
||||||
|
if (!clipEntry) return false;
|
||||||
|
this.emit('delete', clipEntry);
|
||||||
|
|
||||||
|
delete this.index[filename];
|
||||||
|
fs.unlinkSync(path.join(this.videoDirectory, filename));
|
||||||
|
fs.unlinkSync(path.join(this.thumbnailDirectory, clipEntry.thumbnail));
|
||||||
|
fs.writeFileSync(this.indexDir, JSON.stringify(this.index));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async syncIndex() {
|
async syncIndex() {
|
||||||
|
|
||||||
const index = Object.values(this.index);
|
const index = Object.values(this.index);
|
||||||
|
@ -15,7 +15,7 @@ class Logout extends APIEndpoint {
|
|||||||
['post', this.post.bind(this)]
|
['post', this.post.bind(this)]
|
||||||
];
|
];
|
||||||
|
|
||||||
this.middleware = [CheckAuth];
|
this.middleware = [];
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user