add maxCataloguesCount

This commit is contained in:
2026-03-15 14:15:03 +03:30
parent 6002774400
commit 98916399c4
2 changed files with 24 additions and 28 deletions
+4 -10
View File
@@ -8,8 +8,7 @@ import { IDPageConfig } from "../../configs/dpage.config";
import { LoginDto } from './dto/login.dto';
import { DPAGE_CONFIG } from "./constants";
import { FindBusinessesDto } from "./dto/find-businesses.dto";
// import { UsersService } from "../users/providers/users.service";
// import { UpdateDpageDto } from './dto/update-dpage.dto';
@Injectable()
export class DPageService {
@@ -18,8 +17,7 @@ export class DPageService {
@Inject(DPAGE_CONFIG) private readonly config: IDPageConfig,
private readonly httpService: HttpService,
private readonly subscriptionService: SubscriptionsService,
// private readonly usersService: UsersService,
) { }
) { }
private getHeaders(): Record<string, string> {
const credentials = Buffer.from(`${this.config.username}:${this.config.password}`).toString("base64");
@@ -65,7 +63,6 @@ export class DPageService {
async setupDpageAccount(dto: SetupAccountDto) {
try {
// 2. Login with userSubscriptionId
const { data } = await firstValueFrom(
this.httpService
.post(`${this.config.baseUrl}/super-admin/business/setup`, dto,
@@ -89,15 +86,11 @@ export class DPageService {
};
throw new HttpException(errorResponse, error.response.status);
}
this.logger.error(`Error performing direct login: ${error instanceof Error ? error.message : "Unknown error"}`);
this.logger.error(`Error performing setup account: ${error instanceof Error ? error.message : "Unknown error"}`);
throw error;
}
}
// update(id: number, updateDpageDto: UpdateDpageDto) {
// return `This action updates a #${id} dpage`;
// }
remove(id: number) {
return `This action removes a #${id} dpage`;
}
@@ -152,4 +145,5 @@ export class SetupAccountDto {
phone: string;
firstName: string;
lastName: string;
maxCataloguesCount: number
}