refactor: notification-admin controller (#17748)

This commit is contained in:
Jason Rasmussen
2025-04-21 10:49:26 -04:00
committed by GitHub
parent f0ff8581da
commit 488dc4efbd
9 changed files with 36 additions and 36 deletions

View File

@@ -3485,9 +3485,9 @@
]
}
},
"/notifications/templates/{name}": {
"/notifications/admin/templates/{name}": {
"post": {
"operationId": "getNotificationTemplate",
"operationId": "getNotificationTemplateAdmin",
"parameters": [
{
"name": "name",
@@ -3532,13 +3532,13 @@
}
],
"tags": [
"Notifications"
"Notifications (Admin)"
]
}
},
"/notifications/test-email": {
"/notifications/admin/test-email": {
"post": {
"operationId": "sendTestEmail",
"operationId": "sendTestEmailAdmin",
"parameters": [],
"requestBody": {
"content": {
@@ -3574,7 +3574,7 @@
}
],
"tags": [
"Notifications"
"Notifications (Admin)"
]
}
},

View File

@@ -2318,26 +2318,26 @@ export function addMemoryAssets({ id, bulkIdsDto }: {
body: bulkIdsDto
})));
}
export function getNotificationTemplate({ name, templateDto }: {
export function getNotificationTemplateAdmin({ name, templateDto }: {
name: string;
templateDto: TemplateDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TemplateResponseDto;
}>(`/notifications/templates/${encodeURIComponent(name)}`, oazapfts.json({
}>(`/notifications/admin/templates/${encodeURIComponent(name)}`, oazapfts.json({
...opts,
method: "POST",
body: templateDto
})));
}
export function sendTestEmail({ systemConfigSmtpDto }: {
export function sendTestEmailAdmin({ systemConfigSmtpDto }: {
systemConfigSmtpDto: SystemConfigSmtpDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: TestEmailResponseDto;
}>("/notifications/test-email", oazapfts.json({
}>("/notifications/admin/test-email", oazapfts.json({
...opts,
method: "POST",
body: systemConfigSmtpDto