mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 14:04:46 -04:00
Server: Web API: implemented /sdrangel/preset POST
This commit is contained in:
@@ -433,7 +433,7 @@ int WebAPIAdapterGUI::instancePresetPut(
|
||||
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
||||
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
||||
|
||||
if (deviceSetIndex > nbDeviceSets)
|
||||
if (deviceSetIndex >= nbDeviceSets)
|
||||
{
|
||||
*error.getMessage() = QString("There is no device set at index %1. Number of device sets is %2").arg(deviceSetIndex).arg(nbDeviceSets);
|
||||
return 404;
|
||||
@@ -489,7 +489,7 @@ int WebAPIAdapterGUI::instancePresetPost(
|
||||
SWGSDRangel::SWGPresetIdentifier *presetIdentifier = query.getPreset();
|
||||
int nbDeviceSets = m_mainWindow.m_deviceUIs.size();
|
||||
|
||||
if (deviceSetIndex > nbDeviceSets)
|
||||
if (deviceSetIndex >= nbDeviceSets)
|
||||
{
|
||||
*error.getMessage() = QString("There is no device set at index %1. Number of device sets is %2").arg(deviceSetIndex).arg(nbDeviceSets);
|
||||
return 404;
|
||||
|
||||
Reference in New Issue
Block a user