This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpService } from '@nestjs/axios'; | |
import { Injectable } from '@nestjs/common'; | |
import { | |
setupCache, | |
buildMemoryStorage, | |
defaultKeyGenerator, | |
} from 'axios-cache-interceptor'; | |
@Injectable() | |
export class ApiService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get products that does not have item | |
db.getCollection('gplzone').find({ 'item': { $exists: false } }) | |
// Get products that has notes associated | |
db.getCollection('gplzone').find({ 'note': { $exists: true } }) | |
// Get products that was not possible to scrape zip content | |
db.getCollection('gplzone').find({ | |
'item.product_version.is_double_zipped': true | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { deunionize } from 'telegraf'; | |
import { Context } from '../interfaces'; | |
export const getCommandArgs = (ctx: Context): string => { | |
const messageText = deunionize(ctx.message).text; | |
const argsFromCommandRegex = /\/(?:\w+)(?:@\w+?_bot)? (?<args>.*)/i; | |
const args = argsFromCommandRegex.exec(messageText); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { S3 } from 'aws-sdk'; | |
import { Module } from '@nestjs/common'; | |
import { ConfigModule, ConfigService } from '@nestjs/config'; | |
import { scalewayConfig } from '@/app/config/scaleway.config'; | |
import { StorageService } from './services/storage.service'; | |
@Module({ | |
imports: [ConfigModule.forFeature(scalewayConfig)], | |
providers: [ |