Replace calls to crypto.randomUUID

This commit is contained in:
Danny McGee
2024-03-08 19:58:20 -05:00
parent f347ac783f
commit f07ac0c099
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { match } from "@storyteller/utility";
import axios, { AxiosResponse } from "axios";
import { v4 as uuid } from "uuid";
export class StorytellerApi {
#api = axios.create({
@@ -11,7 +12,7 @@ export class StorytellerApi {
const response = await this.#api.postForm<MediaUploadResponse>(
"v1/engine/create_scene",
{
uuid_idempotency_token: crypto.randomUUID(),
uuid_idempotency_token: uuid(),
file,
}, {
headers: { Accept: "text/plain" },
@@ -64,7 +65,7 @@ export class StorytellerApi {
const response = await this.#api.postForm<MediaUploadResponse>(
"v1/media_files/upload/engine_asset",
{
uuid_idempotency_token: crypto.randomUUID(),
uuid_idempotency_token: uuid(),
file,
media_file_subtype: subtype,
},