Merge pull request #465 from max-degterev/canary

Fix domain creation not returning domain data
This commit is contained in:
Mauricio Siu 2024-09-19 15:47:26 -06:00 committed by GitHub
commit 9ee8fb1894
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export const domainRouter = createTRPCRouter({
.input(apiCreateDomain)
.mutation(async ({ input }) => {
try {
await createDomain(input);
return await createDomain(input);
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",

View File

@ -26,7 +26,7 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
if (!domain) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the domain",
message: "Error creating domain",
});
}
@ -34,6 +34,8 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
const application = await findApplicationById(domain.applicationId);
await manageDomain(application, domain);
}
return domain;
});
};