Skip to content

Commit c97df07

Browse files
committed
added more features and logs
1 parent ef773d8 commit c97df07

11 files changed

Lines changed: 5253 additions & 10 deletions

Controller/UsersController.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ public async Task<IActionResult> PatchUser([FromBody] Users? user)
2323
return Ok(new { Message = "User Body is empty!" });
2424

2525
bool isUpdated = await DatabaseService.UpdateUser(user);
26+
27+
if (isUpdated)
28+
{
29+
var gss = GotifySocketService.getInstance();
30+
GotifySocketService.KillAllWsThread();
31+
gss.Start();
32+
}
33+
2634
return Ok(new { Message = isUpdated ? "User successfully updated!" : "User didn't updated!" });
2735
}
2836

@@ -34,6 +42,14 @@ public async Task<IActionResult> DeleteUser(int userId)
3442
Users? usr = userList.Find(x => x.Uid == userId);
3543
if (usr != null)
3644
isDeleted = await usr.Delete();
45+
46+
if (isDeleted)
47+
{
48+
var gss = GotifySocketService.getInstance();
49+
GotifySocketService.KillAllWsThread();
50+
gss.Start();
51+
}
52+
3753
return Ok(new { Message = isDeleted ? "User successfully deleted!" : "User didn't deleted!" });
3854
}
3955
}

Services/WebSockClientNative.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public async Task RunAsync(Users user, CancellationToken cancellationToken)
1919
var client = AppLog.MaskSecret(user.ClientToken);
2020
var gotify = AppLog.SafeUrl(user.GotifyUrl);
2121

22+
AppLog.Info("WebSocket", $"Url is: {wsUrl}");
2223
while (!cancellationToken.IsCancellationRequested && !_isStopped)
2324
{
2425
try

wwwroot/chunk-7WZFGM7C.js

Lines changed: 144 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wwwroot/chunk-DPSKJKXC.js

Lines changed: 1562 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wwwroot/chunk-I5YDCOWB.js

Lines changed: 293 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wwwroot/chunk-QRTCIWFT.js

Lines changed: 3178 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wwwroot/chunk-QUBOLMN4.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wwwroot/favicon.ico

14.7 KB
Binary file not shown.

wwwroot/index.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
<!DOCTYPE html>
2-
<html lang="en">
1+
<!doctype html>
2+
<html lang="en" class="iDark" data-beasties-container>
33
<head>
4-
<meta charset="UTF-8">
5-
<title>Hello World!</title>
6-
</head>
4+
<meta charset="utf-8">
5+
<title>iGotify Assistent UI</title>
6+
<base href="/">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link rel="icon" type="image/x-icon" href="favicon.ico">
9+
<style>@layer theme,base,components,utilities;@layer theme{:root{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before{box-sizing:border-box;margin:0;padding:0;border:0 solid}html{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}}@layer utilities{}@layer keyframes{}html{font-size:14px}</style><link rel="stylesheet" href="styles-XTLRNXMA.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-XTLRNXMA.css"></noscript></head>
710
<body>
8-
<h1>Hello World!</h1>
9-
<h1>Und jetzt in Deutsch</h1>
10-
<h1>Hallo Welt</h1>
11-
</body>
12-
</html>
11+
<app-root></app-root>
12+
<link rel="modulepreload" href="chunk-QUBOLMN4.js"><link rel="modulepreload" href="chunk-7WZFGM7C.js"><script src="main-5EDCXRJ6.js" type="module"></script></body>
13+
</html>

wwwroot/main-5EDCXRJ6.js

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)