diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-23 01:33:14 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-23 01:33:14 -0400 |
| commit | 010c7978ce19392b4f02bdea29e734ac2abac01f (patch) | |
| tree | 4b2d8e15842164aededfff48556253a00b217484 /src/client/cognitive_services | |
| parent | 6248a0a4afd154b84ebea1202a48bec0fd4b87de (diff) | |
further non-breaking cognitive services
Diffstat (limited to 'src/client/cognitive_services')
| -rw-r--r-- | src/client/cognitive_services/CognitiveServices.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/cognitive_services/CognitiveServices.ts b/src/client/cognitive_services/CognitiveServices.ts index 2a3fe1d26..d525455cb 100644 --- a/src/client/cognitive_services/CognitiveServices.ts +++ b/src/client/cognitive_services/CognitiveServices.ts @@ -8,8 +8,8 @@ import { RouteStore } from "../../server/RouteStore"; import { Utils } from "../../Utils"; export enum Services { - ComputerVision, - Face + ComputerVision = "vision", + Face = "face" } export enum Confidence { @@ -38,8 +38,8 @@ export namespace CognitiveServices { export const analyze = async (imageUrl: string, service: Services) => { return fetch(Utils.prepend(`${RouteStore.cognitiveServices}/${service}`)).then(async response => { let apiKey = await response.text(); - if (apiKey) { - return; + if (!apiKey) { + return undefined; } let uriBase; let parameters; |
