Explorar el Código

Move Log Flag API calls to network resource (#40)

Merge branch 'master' into kris/move_log_flag_api_calls

Add network ID in all log flag API calls

Move Log Flag API calls to network resource

Co-authored-by: jonathan <jonathan@noreply.git.bubblev.org>
Co-authored-by: Kristijan Mitrovic <kmitrovic@itekako.com>
Reviewed-on: #40
tags/v0.15.7
Kristijan Mitrovic hace 4 años
committed by jonathan
padre
commit
01ce83f1cb
Se han modificado 3 ficheros con 13 adiciones y 7 borrados
  1. +12
    -0
      bubble-server/src/main/java/bubble/resources/cloud/NetworksResource.java
  2. +0
    -6
      bubble-server/src/main/java/bubble/resources/cloud/NodesResource.java
  3. +1
    -1
      bubble-web

+ 12
- 0
bubble-server/src/main/java/bubble/resources/cloud/NetworksResource.java Ver fichero

@@ -217,4 +217,16 @@ public class NetworksResource extends AccountOwnedResource<BubbleNetwork, Bubble
return configuration.subResource(BackupsResource.class, account, network);
}

@Path("/{id}" + EP_LOGS)
@NonNull public LogsResource getLogs(@NonNull @Context final ContainerRequest ctx,
@NonNull @PathParam("id") String id) {
final var network = find(ctx, id);
if (network == null) throw notFoundEx(id);

// only available for this (current) network
if (!configuration.getThisNetwork().getUuid().equals(network.getUuid())) throw forbiddenEx();

final Account caller = userPrincipal(ctx);
return configuration.subResource(LogsResource.class, caller);
}
}

+ 0
- 6
bubble-server/src/main/java/bubble/resources/cloud/NodesResource.java Ver fichero

@@ -85,10 +85,4 @@ public class NodesResource extends ReadOnlyAccountOwnedResource<BubbleNode, Bubb
return configuration.subResource(NodeManagerResource.class, node);
}

@Path(EP_LOGS)
public LogsResource getLogs(@NonNull @Context final ContainerRequest ctx, @PathParam("id") String id) {
final Account caller = userPrincipal(ctx);
return configuration.subResource(LogsResource.class, caller);
}

}

+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 35d921827a1fd83361d68c2554d42a7686216b39
Subproject commit 24a0dc8f23304dd689a0e1420ca879e2e2147ff0

Cargando…
Cancelar
Guardar