Skip to content

Commit f36352b

Browse files
committed
1 parent 21c3cb6 commit f36352b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/v2/service/texture.service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ export default class TextureService {
129129
return createdTexture;
130130
}
131131

132-
createEntireTextures(body: EntireTextureToCreate[]): Promise<Textures> {
133-
// create textures
134-
return Promise.all(body.map((t) => this.createEntireTexture(t)));
132+
async createEntireTextures(body: EntireTextureToCreate[]): Promise<Textures> {
133+
const res: Textures = [];
134+
// must be done synchronously to prevent id collisions
135+
for (const tex of body) res.push(await this.createEntireTexture(tex));
136+
return res;
135137
}
136138

137139
async changeTexture(id: string, body: TextureCreationParam): Promise<Texture> {

0 commit comments

Comments
 (0)