Explorar el Código

AppData.device is optional

tags/v1.0.2
Jonathan Cobb hace 4 años
padre
commit
5cc384cfb0
Se han modificado 1 ficheros con 5 adiciones y 3 borrados
  1. +5
    -3
      bubble-server/src/main/java/bubble/resources/app/DataResourceBase.java

+ 5
- 3
bubble-server/src/main/java/bubble/resources/app/DataResourceBase.java Ver fichero

@@ -108,9 +108,11 @@ public abstract class DataResourceBase extends AccountOwnedTemplateResource<AppD
if (app == null) throw notFoundEx(request.getApp());
request.setApp(app.getUuid());

final Device device = deviceDAO.findByAccountAndId(caller.getUuid(), request.getDevice());
if (device == null) throw notFoundEx(request.getDevice());
request.setDevice(device.getUuid());
if (request.hasDevice()) {
final Device device = deviceDAO.findByAccountAndId(caller.getUuid(), request.getDevice());
if (device == null) throw notFoundEx(request.getDevice());
request.setDevice(device.getUuid());
}

final AppSite site = siteDAO.findByAccountAndId(caller.getUuid(), request.getSite());
if (site == null) throw notFoundEx(request.getSite());


Cargando…
Cancelar
Guardar