import { Injectable } from '@nestjs/common' ; import { ApplicationRepository } from '@notifire/dal' ; import { GetWidgetSettingsCommand } from './get-widget-settings.command' ; @ Injectable ( ) export class GetWidgetSettings { constructor ( private applicationRepository ) { } async execute ( command ) { const application = await this . applicationRepository . findApplicationByIdentifier ( command . identifier ) ; return { _id : application . _id , _organizationId : application . _organizationId , } ; } }