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 dayjs from 'dayjs' | |
| import { createApifyClient } from './apify' | |
| export const searchPostsByQuery = async ({ | |
| query, | |
| afterDate, | |
| beforeDate, | |
| maxPagesPerQuery = 10, | |
| resultsPerPage = 20, | |
| }: { |
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
| export function namingSnakeToCamel(text: string) { | |
| return text.replace(/_(\w)/g, (match, target: string) => target.toUpperCase()); | |
| } |
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
| STATIC_URL = '/static/' | |
| STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) | |
| TEMPLATES = [ | |
| { | |
| 'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
| 'DIRS': [os.path.join(BASE_DIR, 'static')], | |
| 'APP_DIRS': True, | |
| 'OPTIONS': { | |
| 'context_processors': [ |
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
| export function debounceUntilResolve(func: any) { | |
| let isDone = true; | |
| return async (...args: any[]) => { | |
| if (!isDone) { | |
| return; | |
| } | |
| isDone = false; |