forked from dresden-elektronik/deconz-rest-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest_scenes.cpp
30 lines (28 loc) · 771 Bytes
/
rest_scenes.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* Copyright (c) 2018 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#include "de_web_plugin.h"
#include "de_web_plugin_private.h"
/*! Scenes REST API broker.
\param req - request data
\param rsp - response data
\return REQ_READY_SEND
REQ_NOT_HANDLED
*/
int DeRestPluginPrivate::handleScenesApi(const ApiRequest &req, ApiResponse &rsp)
{
Q_UNUSED(req);
if (rsp.map.isEmpty())
{
rsp.str = "{}"; // return empty object
}
rsp.httpStatus = HttpStatusOk;
return REQ_READY_SEND;
// return REQ_NOT_HANDLED;
}