mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-20 12:29:14 +08:00
remove version params
This commit is contained in:
parent
f8a0dbd0ac
commit
efc405b1a0
@ -83,14 +83,13 @@ export class SearcherHost extends RPCHost {
|
|||||||
auth: JinaEmbeddingsAuthDTO,
|
auth: JinaEmbeddingsAuthDTO,
|
||||||
@Param('count', { default: 5, validate: (v) => v >= 0 && v <= 20 })
|
@Param('count', { default: 5, validate: (v) => v >= 0 && v <= 20 })
|
||||||
count: number,
|
count: number,
|
||||||
@Param('version', { default: 1, validate: (v) => v >= 1 })
|
|
||||||
version: number,
|
|
||||||
crawlerOptions: CrawlerOptions,
|
crawlerOptions: CrawlerOptions,
|
||||||
searchExplicitOperators: GoogleSearchExplicitOperatorsDto,
|
searchExplicitOperators: GoogleSearchExplicitOperatorsDto,
|
||||||
@Param('q') q?: string,
|
@Param('q') q?: string,
|
||||||
) {
|
) {
|
||||||
const uid = await auth.solveUID();
|
const uid = await auth.solveUID();
|
||||||
const isVersion2 = version === 2;
|
const version = ctx?.req.get('x-version');
|
||||||
|
const isVersion2 = version?.replace('v', '') === '2';
|
||||||
|
|
||||||
let chargeAmount = 0;
|
let chargeAmount = 0;
|
||||||
const noSlashPath = decodeURIComponent(ctx.req.path).slice(1);
|
const noSlashPath = decodeURIComponent(ctx.req.path).slice(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user