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!

added get for publish extension

kruzhambus8bd362ddfbbe
diff --git a/docker-compose.yml b/docker-compose.yml
index 854c38a47..0e1b339d6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,22 +1,37 @@
-version: ${DOCKER_VERSION}
+version: '3'
services:
+ # clickhouse:
+ # image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}
+ # container_name: clickhouse
+ # environment:
+ # - CLICKHOUSE_USER=${CLICKHOUSE_USER}
+ # - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
+ # - CLICKHOUSE_DB=${CLICKHOUSE_DB}
+ # ports:
+ # - '8123:8123'
+ # volumes:
+ # - clickhouse:/var/lib/clickhouse
mysql:
image: mysql:${MYSQL_VERSION}
- container_name: swetrix-api-mysql
+ container_name: mysql
environment:
- - MYSQL_ALLOW_EMPTY_PASSWORD=yes
+ - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
+ - MYSQL_USER=${MYSQL_USER}
+ - MYSQL_PASSWORD=${MYSQL_PASSWORD}
+ - MYSQL_DATABASE=${MYSQL_DATABASE}
ports:
- - ${MYSQL_PORT}:3306
+ - '3306:3306'
+ volumes:
+ - mysql:/var/lib/mysql
redis:
image: redis:${REDIS_VERSION}
- container_name: swetrix-api-redis
+ container_name: redis
+ # command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- - ${REDIS_PORT}:6379
- clickhouse:
- image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}
- container_name: swetrix-api-clickhouse
- ports:
- - ${CLICKHOUSE_PORT}:8123
-networks:
- default:
- name: swetrix-api
\ No newline at end of file
+ - '6379:6379'
+ volumes:
+ - redis:/var/lib/redis
+volumes:
+ # clickhouse:
+ mysql:
+ redis:
diff --git a/src/marketplace/cdn/cdn.service.ts b/src/marketplace/cdn/cdn.service.ts
index fcc0eeb7d..e5fd25c6b 100644
--- a/src/marketplace/cdn/cdn.service.ts
+++ b/src/marketplace/cdn/cdn.service.ts
@@ -30,7 +30,6 @@ export class CdnService {
})
await unlink(filePath)
-
return data
} catch (error) {
console.error(error)
diff --git a/src/marketplace/extensions/extensions.controller.ts b/src/marketplace/extensions/extensions.controller.ts
index 9a74ab68c..78029a0f5 100644
--- a/src/marketplace/extensions/extensions.controller.ts
+++ b/src/marketplace/extensions/extensions.controller.ts
@@ -75,6 +75,55 @@ export class ExtensionsController {
return { extensions, count }
}
+ @ApiQuery({
+ description: 'Extension term',
+ example: '',
+ name: 'term',
+ type: String,
+ })
+ @ApiQuery({
+ description: 'Extension category',
+ example: '',
+ name: 'category',
+ required: false,
+ type: String,
+ })
+ @ApiQuery({
+ description: 'Extension sortBy',
+ example: 'createdAt',
+ name: 'sortBy',
+ required: false,
+ type: String,
+ })
+ @ApiQuery({
+ description: 'Extension offset',
+ example: '5',
+ name: 'offset',
+ required: false,
+ type: String,
+ })
+ @ApiQuery({
+ description: 'Extension limit',
+ example: '25',
+ name: 'limit',
+ required: false,
+ type: String,
+ })
+ @Get('published')
+ async getAllPublishedExtensions(
+ @Query() queries: GetAllExtensionsQueries,
+ ): Promise<{
+ extensions: Extension[]
+ count: number
+ }> {
+ const [extensions, count] = await this.extensionsService.findAndCount({
+ skip: queries.offset || 0,
+ take: queries.limit > 100 ? 25 : queries.limit || 25,
+ })
+
+ return { extensions, count }
+ }
+
@ApiQuery({
description: 'Extension term',
example: '',