export async function annotateImageByCloudImageInfo()

in src/frontend/src/queries.ts [144:158]


export async function annotateImageByCloudImageInfo(
  info: CloudImageInfo
): Promise<ImageAnnotationResult> {
  const annotation = info.annotation;

  if (annotation != null) {
    return client
      .get<ImageAnnotationResult>(`/bucket/annotation/${annotation}`, {
        params: { image_uri: info.annotation },
      })
      .then((response) => response.data);
  } else {
    throw Error("No annotation exists for this image");
  }
}