File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change 11import { SubscribeMessage , WebSocketGateway , WebSocketServer } from "@nestjs/websockets" ;
22import { Server } from "socket.io" ;
3- import { AsyncApiSub } from "nestjs-asyncapi" ;
43import CachedWebtoonModel from "../webtoon/webtoon/models/models/cached-webtoon.model" ;
54
65@WebSocketGateway ( {
@@ -14,34 +13,16 @@ export class DownloadGateway{
1413 @WebSocketServer ( ) socket : Server ;
1514
1615 @SubscribeMessage ( "episode/progress" )
17- @AsyncApiSub ( {
18- channel : "download/episode/progress" ,
19- message : {
20- payload : Number ,
21- } ,
22- } )
2316 public onEpisodeProgress ( progress : number ) {
2417 this . socket . emit ( "episode/progress" , progress ) ;
2518 }
2619
2720 @SubscribeMessage ( "progress" )
28- @AsyncApiSub ( {
29- channel : "download/progress" ,
30- message : {
31- payload : Number ,
32- } ,
33- } )
3421 public onDownloadProgress ( progress : number ) {
3522 this . socket . emit ( "progress" , progress ) ;
3623 }
3724
3825 @SubscribeMessage ( "start" )
39- @AsyncApiSub ( {
40- channel : "download/start" ,
41- message : {
42- payload : CachedWebtoonModel ,
43- } ,
44- } )
4526 public onDownloadStart ( webtoon : CachedWebtoonModel ) {
4627 this . socket . emit ( "start" , webtoon ) ;
4728 }
You can’t perform that action at this time.
0 commit comments