test(caddy): cover invalid path branches; ci: handle go test non-zero when coverage file exists

This commit is contained in:
CI
2025-11-29 08:55:25 +00:00
parent 0c62118989
commit fcc273262c
51 changed files with 1117 additions and 205 deletions

View File

@@ -6,6 +6,7 @@ export interface NotificationProvider {
type: string;
url: string;
config?: string;
template?: string;
enabled: boolean;
notify_proxy_hosts: boolean;
notify_remote_servers: boolean;
@@ -37,3 +38,15 @@ export const deleteProvider = async (id: string) => {
export const testProvider = async (provider: Partial<NotificationProvider>) => {
await client.post('/notifications/providers/test', provider);
};
export const getTemplates = async () => {
const response = await client.get('/notifications/templates');
return response.data;
};
export const previewProvider = async (provider: Partial<NotificationProvider>, data?: Record<string, any>) => {
const payload: any = { ...provider };
if (data) payload.data = data;
const response = await client.post('/notifications/providers/preview', payload);
return response.data;
};