fix ping
This commit is contained in:
@@ -5,7 +5,7 @@ import icoToPng from 'ico-to-png';
|
|||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
|
|
||||||
import { createHash } from '@openpanel/common';
|
import { createHash } from '@openpanel/common';
|
||||||
import { ch, TABLE_NAMES } from '@openpanel/db';
|
import { ch, formatClickhouseDate, TABLE_NAMES } from '@openpanel/db';
|
||||||
import { getRedisCache } from '@openpanel/redis';
|
import { getRedisCache } from '@openpanel/redis';
|
||||||
|
|
||||||
interface GetFaviconParams {
|
interface GetFaviconParams {
|
||||||
@@ -128,7 +128,7 @@ export async function ping(
|
|||||||
{
|
{
|
||||||
domain: request.body.domain,
|
domain: request.body.domain,
|
||||||
count: request.body.count,
|
count: request.body.count,
|
||||||
created_at: new Date(),
|
created_at: formatClickhouseDate(new Date(), true),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
format: 'JSONEachRow',
|
format: 'JSONEachRow',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export async function ping() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (typeof res?.count === 'number') {
|
if (typeof res?.count === 'number') {
|
||||||
const response = await fetch('https://api.openpanel.com/misc/ping', {
|
const response = await fetch('https://api.openpanel.dev/misc/ping', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user