oops revert
This commit is contained in:
parent
eb54250031
commit
d9548f6207
|
@ -420,12 +420,12 @@ public class Controller : ControllerBase
|
|||
}
|
||||
|
||||
[HttpDelete(nameof(DeleteInstallation))]
|
||||
public ActionResult DeleteInstallation(Int64 installationId, Token authToken)
|
||||
public async Task<ActionResult> 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();
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ public static class SessionMethods
|
|||
.Apply(Db.Update);
|
||||
}
|
||||
|
||||
public static Boolean Delete(this Session? session, Installation? installation)
|
||||
public static async Task<Boolean> 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)
|
||||
|
|
|
@ -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; }
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue