File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ public async Task<IActionResult> PostDeviceModel(DeviceModel deviceModel)
4040
4141 if ( await deviceModel . Insert ( ) )
4242 {
43- GotifySocketService . getInstance ( ) ;
44- GotifySocketService . StartWsThread ( deviceModel . GotifyUrl , deviceModel . ClientToken ) ;
43+ var gss = GotifySocketService . getInstance ( ) ;
44+ GotifySocketService . KillAllWsThread ( ) ;
45+ gss . Start ( ) ;
4546 result = "Gerät erfolgreich hinzugefügt" ;
4647 resultBool = true ;
4748 }
@@ -77,12 +78,9 @@ public async Task<IActionResult> DeleteDevcice(string token)
7778 var usr = await DatabaseService . GetUser ( token ) ;
7879 if ( await deviceModel . Delete ( ) )
7980 {
80- if ( usr . Uid > 0 )
81- {
82- GotifySocketService . getInstance ( ) ;
83- GotifySocketService . KillWsThread ( usr . ClientToken ) ;
84- }
85-
81+ var gss = GotifySocketService . getInstance ( ) ;
82+ GotifySocketService . KillAllWsThread ( ) ;
83+ gss . Start ( ) ;
8684 result = "Device deleted successfully!" ;
8785 resultBool = true ;
8886 }
Original file line number Diff line number Diff line change 66 <ImplicitUsings >enable</ImplicitUsings >
77 <InvariantGlobalization >true</InvariantGlobalization >
88 <RootNamespace >iGotify_Notification_Assist</RootNamespace >
9- <AssemblyVersion >1.5.0.1 </AssemblyVersion >
10- <FileVersion >1.5.0.1 </FileVersion >
9+ <AssemblyVersion >1.5.0.2 </AssemblyVersion >
10+ <FileVersion >1.5.0.2 </FileVersion >
1111 <Version >1.5.0.1</Version >
1212 <LangVersion >default</LangVersion >
1313 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments