ソースを参照

AppData.device is optional

tags/v1.0.2
Jonathan Cobb 4年前
コミット
5cc384cfb0
1個のファイルの変更5行の追加3行の削除
  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 ファイルの表示

@@ -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());


読み込み中…
キャンセル
保存