refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
@@ -5,6 +5,7 @@ import type { Config } from '@/config.js';
|
||||
import { ImageProcessingService } from '@/core/ImageProcessingService.js';
|
||||
import type { IImage } from '@/core/ImageProcessingService.js';
|
||||
import { createTempDir } from '@/misc/create-temp.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
@Injectable()
|
||||
export class VideoProcessingService {
|
||||
@@ -16,6 +17,7 @@ export class VideoProcessingService {
|
||||
) {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async generateVideoThumbnail(source: string): Promise<IImage> {
|
||||
const [dir, cleanup] = await createTempDir();
|
||||
|
||||
|
Reference in New Issue
Block a user