Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamanishx committed Feb 26, 2025
1 parent 8066c5c commit 8b206cc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
3 changes: 1 addition & 2 deletions src/graphql/types/Mutation/createPresignedUrl.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError";
import { builder } from "../../builder";
import { UploadUrlResponse } from "../../types/Post/UploadUrlResponse";
import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError";


const MutationCreatePresignedUrlInput = builder.inputType(
"MutationCreatePresignedUrlInput",
Expand Down
16 changes: 8 additions & 8 deletions src/graphql/types/Post/UploadUrlResponse.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { builder } from "../../builder";

export interface UploadUrlResponse {
presignedUrl: string;
fileUrl: string;
presignedUrl: string;
fileUrl: string;
}

export const UploadUrlResponse =
builder.objectRef<UploadUrlResponse>("UploadUrlResponse");
builder.objectRef<UploadUrlResponse>("UploadUrlResponse");

UploadUrlResponse.implement({
description: "UploadUrlResponse",
fields: (t) => ({
presignedUrl: t.exposeString("presignedUrl"),
fileUrl: t.exposeString("fileUrl"),
}),
description: "UploadUrlResponse",
fields: (t) => ({
presignedUrl: t.exposeString("presignedUrl"),
fileUrl: t.exposeString("fileUrl"),
}),
});
6 changes: 3 additions & 3 deletions src/plugins/minioClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare module "fastify" {
config: {
endPoint: string;
port: number;
};
};
};
}
}
Expand Down Expand Up @@ -74,8 +74,8 @@ export const minioClient = fastifyPlugin(async (fastify) => {
client,
config: {
endPoint: fastify.envConfig.API_MINIO_END_POINT,
port: fastify.envConfig.API_MINIO_PORT
}
port: fastify.envConfig.API_MINIO_PORT,
},
});
}, {});

Expand Down
4 changes: 4 additions & 0 deletions test/graphql/types/Community/updater.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ describe("Community Resolver - Updater Field", () => {
putObject: vi.fn(),
getObject: vi.fn(),
} as unknown as MinioClient,
config: {
endPoint: "minio",
port: 9000
},
},
currentClient: {
isAuthenticated: true,
Expand Down
4 changes: 4 additions & 0 deletions test/graphql/types/Mutation/updateAgendaItem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ const authenticatedContext: TestContext = {
minio: {
bucketName: "talawa",
client: {} as MinioClient, // minimal mock that satisfies the type
config: {
endPoint: "minio",
port: 9000
}
},
pubsub: {
publish: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion test/routes/graphql/documentNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,4 @@ export const Mutation_createPresignedUrl = gql(`
presignedUrl
}
}
`);
`);
4 changes: 2 additions & 2 deletions test/routes/graphql/gql.tada.d.ts

Large diffs are not rendered by default.

0 comments on commit 8b206cc

Please sign in to comment.