diff --git a/csharp/App/Backend/Controller.cs b/csharp/App/Backend/Controller.cs index bbaa7f3ca..ada5ed86a 100644 --- a/csharp/App/Backend/Controller.cs +++ b/csharp/App/Backend/Controller.cs @@ -420,12 +420,12 @@ public class Controller : ControllerBase } [HttpDelete(nameof(DeleteInstallation))] - public ActionResult DeleteInstallation(Int64 installationId, Token authToken) + public async Task DeleteInstallation(Int64 installationId, Token authToken) { var session = Db.GetSession(authToken); var installation = Db.GetInstallationById(installationId); - return session.Delete(installation) + return await session.Delete(installation) ? Ok() : Unauthorized(); } diff --git a/csharp/App/Backend/DataTypes/Methods/Session.cs b/csharp/App/Backend/DataTypes/Methods/Session.cs index 120a1ab72..8f2ee1191 100644 --- a/csharp/App/Backend/DataTypes/Methods/Session.cs +++ b/csharp/App/Backend/DataTypes/Methods/Session.cs @@ -135,7 +135,7 @@ public static class SessionMethods .Apply(Db.Update); } - public static Boolean Delete(this Session? session, Installation? installation) + public static async Task Delete(this Session? session, Installation? installation) { var user = session?.User; @@ -143,7 +143,8 @@ public static class SessionMethods && installation is not null && user.HasWriteAccess && user.HasAccessTo(installation) - && Db.Delete(installation); + && Db.Delete(installation) + && await installation.DeleteBucket(); } public static Boolean Create(this Session? session, User newUser) diff --git a/csharp/App/Backend/S3/S3Cmd.cs b/csharp/App/Backend/S3/S3Cmd.cs index 1e88d7148..53305e963 100644 --- a/csharp/App/Backend/S3/S3Cmd.cs +++ b/csharp/App/Backend/S3/S3Cmd.cs @@ -14,8 +14,8 @@ public class S3Cmd private const String? S3CmdPath = "Resources/s3cmd.py"; private const String S3Prefix = "s3://"; - public String Key { get; init; } = S3Access.ReadWrite.Key; - public String Secret { get; init; } = S3Access.ReadWrite.Secret; + public String Key { get; init; } + public String Secret { get; init; } public String Region { get; init; } = "sos-ch-dk-2.exo.io"; // private String?[] DefaultArgs { get; } diff --git a/csharp/App/VrmGrabber/db.sqlite b/csharp/App/VrmGrabber/db.sqlite index 0032af2b3..382d49a9e 100644 Binary files a/csharp/App/VrmGrabber/db.sqlite and b/csharp/App/VrmGrabber/db.sqlite differ