Browse Source

Refactoring

pull/6960/head
Thomas Kaul 3 months ago
parent
commit
fc8b92377d
  1. 11
      apps/api/src/services/fetch/fetch.service.ts

11
apps/api/src/services/fetch/fetch.service.ts

@ -102,13 +102,10 @@ export class FetchService {
private async fetchViaWebFetchTool( private async fetchViaWebFetchTool(
url: string url: string
): Promise<Response | undefined> { ): Promise<Response | undefined> {
const openRouterApiKey = await this.propertyService.getByKey<string>( const [openRouterApiKey, openRouterModel] = await Promise.all([
PROPERTY_API_KEY_OPENROUTER this.propertyService.getByKey<string>(PROPERTY_API_KEY_OPENROUTER),
); this.propertyService.getByKey<string>(PROPERTY_OPENROUTER_MODEL)
]);
const openRouterModel = await this.propertyService.getByKey<string>(
PROPERTY_OPENROUTER_MODEL
);
if (!openRouterApiKey || !openRouterModel) { if (!openRouterApiKey || !openRouterModel) {
return undefined; return undefined;

Loading…
Cancel
Save