|
|
|
@ -16,11 +16,7 @@ import type { JobStatus } from '../../interface/Jobs';
|
|
|
|
|
|
|
|
|
|
const url = new URL(process.env.NC_PUBLIC_URL || `http://localhost:${process.env.PORT || '8080'}/`) |
|
|
|
|
let namespace = url.pathname |
|
|
|
|
if (!namespace.endsWith('/')) { |
|
|
|
|
namespace = namespace + '/jobs'; |
|
|
|
|
} else { |
|
|
|
|
namespace = namespace + 'jobs'; |
|
|
|
|
} |
|
|
|
|
namespace += namespace.endsWith("/") ? "jobs" : "/jobs" |
|
|
|
|
|
|
|
|
|
@WebSocketGateway({ |
|
|
|
|
cors: { |
|
|
|
@ -28,7 +24,7 @@ if (!namespace.endsWith('/')) {
|
|
|
|
|
allowedHeaders: ['xc-auth'], |
|
|
|
|
credentials: true, |
|
|
|
|
}, |
|
|
|
|
namespace: namespace, |
|
|
|
|
namespace, |
|
|
|
|
}) |
|
|
|
|
export class JobsGateway implements OnModuleInit { |
|
|
|
|
constructor(@Inject('JobsService') private readonly jobsService) {} |
|
|
|
|