Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix linters

Yehor Dremliuha4b18ef95a02a
diff --git a/apps/production/src/project/dto/create-project-view.dto.ts b/apps/production/src/project/dto/create-project-view.dto.ts
index 783d7caf0..d5743ffc7 100644
--- a/apps/production/src/project/dto/create-project-view.dto.ts
+++ b/apps/production/src/project/dto/create-project-view.dto.ts
@@ -85,7 +85,10 @@ export class CreateProjectViewDto {
type: ProjectViewType
@ApiProperty({ description: 'Page the user viewed (/hello)', nullable: true })
- @Matches(/^\/[a-zA-Z0-9-_\/\[\]]*$/, { message: 'Invalid URL path format for pg' })
+ /* eslint-disable-next-line */
+ @Matches(/^\/[a-zA-Z0-9-_\/\[\]]*$/, {
+ message: 'Invalid URL path format for pg',
+ })
@IsOptional()
pg?: string
@@ -120,12 +123,15 @@ export class CreateProjectViewDto {
lc?: string
@ApiProperty({
- description: 'Referrer (site from which the user came to the site using Swetrix)',
+ description:
+ 'Referrer (site from which the user came to the site using Swetrix)',
nullable: true,
})
- @Matches(/^(https?:\/\/)?([a-zA-Z0-9.-]+)(:[0-9]{1,5})?(\/.*)?$/, { message: 'Invalid referrer URL format' })
+ @Matches(/^(https?:\/\/)?([a-zA-Z0-9.-]+)(:[0-9]{1,5})?(\/.*)?$/, {
+ message: 'Invalid referrer URL format',
+ })
@IsOptional()
- ref?: string;
+ ref?: string
@ApiProperty({ description: 'UTM source', nullable: true })
@MaxLength(100)
diff --git a/apps/production/src/project/project.controller.ts b/apps/production/src/project/project.controller.ts
index 6705fb027..ae8cf8426 100644
--- a/apps/production/src/project/project.controller.ts
+++ b/apps/production/src/project/project.controller.ts
@@ -1908,8 +1908,8 @@ export class ProjectController {
@Roles(UserType.CUSTOMER, UserType.ADMIN)
async getProjectView(
@Param() params: ProjectViewIdsDto,
- @CurrentUserId() userId: string
- ){
+ @CurrentUserId() userId: string,
+ ) {
const project = await this.projectService.findProject(params.projectId, [
'admin',
'share',
@@ -1926,8 +1926,10 @@ export class ProjectController {
}
this.projectService.allowedToManage(project, userId, user.roles)
- return this.projectsViewsRepository.findProjectView(params.projectId, params.viewId)
-
+ return this.projectsViewsRepository.findProjectView(
+ params.projectId,
+ params.viewId,
+ )
}
@ApiOperation({ summary: 'Create project view' })