Skip to content

Commit

Permalink
fix: some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
romansharapov19 committed Sep 8, 2023
1 parent 8f52a49 commit b1aefb1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/ai/ai-models.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class AiModelsRepository {
meta: {
...superAdminAddModelRequestDto.meta,
...(superAdminAddModelRequestDto.meta.apiKey
? { apiKey: encrypt(superAdminAddModelRequestDto.meta['apiKey']) }
? { apiKey: encrypt(superAdminAddModelRequestDto.meta.apiKey) }
: {}),
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/ai/ai.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AiController {
@ApiClerkAuthHeaders()
@ApiOkResponse({ type: AiModelResponseDto, isArray: true })
@ApiOperation({ description: 'Get the AI Model list for all users' })
async superAdminFindAiModels(): Promise<AiModelResponseDto[]> {
async findAiModels(): Promise<AiModelResponseDto[]> {
return this.findAiModelsUsecase.execute();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AdminFindAiModelsUsecase implements Usecase {
const aiModels = await this.aiModelsRepository.findAll();
for (const aiModel of aiModels) {
if (aiModel.meta && aiModel.meta['apiKey']) {
aiModel.meta['apiKey'] = decrypt(aiModel.meta['apiKey']);
aiModel.meta.apiKey = decrypt(aiModel.meta.apiKey);
}
}
return aiModels.map((aiModel) =>
Expand Down
4 changes: 2 additions & 2 deletions packages/contract/rooms/create-room.request.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { string, z } from "zod";
import { z } from "zod";

export const CreateRoomRequestSchema = z.object({
name: z
Expand All @@ -10,7 +10,7 @@ export const CreateRoomRequestSchema = z.object({
.refine((value) => value.length <= 50, {
message: "Name must have at most 50 characters",
}),
aiModelId: string(),
aiModelId: z.string(),
isPrivate: z.boolean().default(false),
ownerId: z.string(),
});

0 comments on commit b1aefb1

Please sign in to comment.