1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-15 03:30:33 +02:00

fix(server): http error parsing on endpoints without a default response (#12927)

This commit is contained in:
Jason Rasmussen
2024-09-25 12:05:03 -04:00
committed by GitHub
parent 8d515adac5
commit 005528ab5e
13 changed files with 162 additions and 18 deletions

View File

@ -656,6 +656,9 @@ export type SystemConfigSmtpDto = {
replyTo: string;
transport: SystemConfigSmtpTransportDto;
};
export type TestEmailResponseDto = {
messageId: string;
};
export type OAuthConfigDto = {
redirectUri: string;
};
@ -2220,7 +2223,10 @@ export function addMemoryAssets({ id, bulkIdsDto }: {
export function sendTestEmail({ systemConfigSmtpDto }: {
systemConfigSmtpDto: SystemConfigSmtpDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/notifications/test-email", oazapfts.json({
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TestEmailResponseDto;
}>("/notifications/test-email", oazapfts.json({
...opts,
method: "POST",
body: systemConfigSmtpDto