diff --git a/src/v2/controller/contributions.controller.ts b/src/v2/controller/contributions.controller.ts index d397f64..c8fc6f8 100644 --- a/src/v2/controller/contributions.controller.ts +++ b/src/v2/controller/contributions.controller.ts @@ -140,7 +140,7 @@ export class ContributionsController extends Controller { @Security("bot") public async addContribution( @Body() body: ContributionCreationParams | ContributionCreationParams[], - ): Promise { + ): Promise { return Array.isArray(body) ? this.service.addContributions(body) : this.service.addContribution(body); diff --git a/src/v2/repository/firestorm/path.repository.ts b/src/v2/repository/firestorm/path.repository.ts index a8f7ff5..749a1bb 100644 --- a/src/v2/repository/firestorm/path.repository.ts +++ b/src/v2/repository/firestorm/path.repository.ts @@ -32,7 +32,7 @@ export default class PathFirestormRepository implements PathRepository { return paths.add(structuredClone(path)).then((id) => ({ ...structuredClone(path), id })); } - createPathBulk(pathArray: InputPath[]): Promise { + createPathBulk(pathArray: InputPath[]): Promise { return paths.addBulk(pathArray).then((ids) => paths.searchKeys(ids)); } diff --git a/src/v2/repository/firestorm/user.repository.ts b/src/v2/repository/firestorm/user.repository.ts index 1d6fcb5..1ee413f 100644 --- a/src/v2/repository/firestorm/user.repository.ts +++ b/src/v2/repository/firestorm/user.repository.ts @@ -2,7 +2,6 @@ import { users } from "../../firestorm"; import { Addons, Contributions, - Media, UserNames, User, Users, @@ -10,6 +9,7 @@ import { UserRepository, UserName, UserProfile, + Medias, } from "../../interfaces"; // eslint-disable-next-line no-underscore-dangle @@ -115,7 +115,7 @@ export default class UserFirestormRepository implements UserRepository { ignoreCase: true, }, ]) - .then((arr: Array) => arr.map((el) => __transformUser(el))); + .then((arr: Users) => arr.map((el) => __transformUser(el))); } getUsersFromRole(role: string, username?: string): Promise { @@ -138,7 +138,7 @@ export default class UserFirestormRepository implements UserRepository { ignoreCase: true, }); - return users.search(options).then((arr: Array) => arr.map((el) => __transformUser(el))); + return users.search(options).then((arr: Users) => arr.map((el) => __transformUser(el))); } getRoles(): Promise> { @@ -183,7 +183,7 @@ export default class UserFirestormRepository implements UserRepository { username: string; uuid: string; anonymous: boolean; - media: Media[]; + media: Medias; }>, ) => _users.map((el) => ({ diff --git a/src/v2/service/contributions.service.ts b/src/v2/service/contributions.service.ts index 1e4ae93..a7d825d 100644 --- a/src/v2/service/contributions.service.ts +++ b/src/v2/service/contributions.service.ts @@ -133,7 +133,7 @@ export default class ContributionService { return this.contributionRepo.addContribution(params); } - addContributions(params: ContributionCreationParams[]): Promise { + addContributions(params: ContributionCreationParams[]): Promise { return this.contributionRepo.addContributions(params); } diff --git a/src/v2/service/texture.service.ts b/src/v2/service/texture.service.ts index 95c7e30..11af9ec 100644 --- a/src/v2/service/texture.service.ts +++ b/src/v2/service/texture.service.ts @@ -1,4 +1,4 @@ -import { Contributions, InputPath, Paths, Texture, Textures, Use, Uses } from "../interfaces"; +import { Contributions, InputPath, Paths, Texture, Textures, Uses } from "../interfaces"; import { Edition, EntireTextureToCreate, @@ -97,7 +97,7 @@ export default class TextureService { const textureID = createdTexture.id; // create uses - const [useIDs, fullUsesToCreate]: [string[], Use[]] = input.uses.reduce( + const [useIDs, fullUsesToCreate]: [string[], Uses] = input.uses.reduce( (acc, u, ui) => { const useID = String(textureID) + String.fromCharCode("a".charCodeAt(0) + ui); const use = {