57 lines
1.2 KiB
C#
57 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Web.Http;
|
|
using TencentCloud.Common.Profile;
|
|
using TencentCloud.Common;
|
|
|
|
namespace MQTTServerSideAPI.Controllers
|
|
{
|
|
public class ConfigController : ApiController
|
|
{
|
|
// GET api/<controller>
|
|
public IEnumerable<string> Get()
|
|
{
|
|
return new string[] { "value1", "value2" };
|
|
}
|
|
|
|
// GET api/<controller>/5
|
|
public string Get(string cmd6tsp)
|
|
{
|
|
string retString = "";
|
|
|
|
if (String.IsNullOrEmpty(cmd6tsp))
|
|
cmd6tsp = "0";
|
|
|
|
if(cmd6tsp == "0")
|
|
{
|
|
SQLiteDBHelper.UpdateCm6TSP("0");
|
|
}
|
|
else
|
|
{
|
|
SQLiteDBHelper.UpdateCm6TSP(cmd6tsp);
|
|
}
|
|
|
|
|
|
return retString;
|
|
}
|
|
|
|
// POST api/<controller>
|
|
public void Post([FromBody] string value)
|
|
{
|
|
}
|
|
|
|
// PUT api/<controller>/5
|
|
public void Put(int id, [FromBody] string value)
|
|
{
|
|
}
|
|
|
|
// DELETE api/<controller>/5
|
|
public void Delete(int id)
|
|
{
|
|
}
|
|
}
|
|
}
|