diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-14 09:28:15 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-14 09:28:15 +0300 |
| commit | 641171e30368056bd97fd53c8dade56889739bc3 (patch) | |
| tree | 883580efb85d1802552c6531bbf890e530ed4a0c /Software/Visual_Studio | |
| parent | b8df604c464ffb43f1858377cbb08d8f622b9cd1 (diff) | |
| download | Tango-641171e30368056bd97fd53c8dade56889739bc3.tar.gz Tango-641171e30368056bd97fd53c8dade56889739bc3.zip | |
Working on TCC...
Diffstat (limited to 'Software/Visual_Studio')
4 files changed, 49 insertions, 0 deletions
diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj b/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj index 7d677edc3..733e2ba9f 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Tango.TCC.BL.csproj @@ -73,6 +73,8 @@ <Compile Include="Web\DefinitionResponse.cs" /> <Compile Include="Web\LoginRequest.cs" /> <Compile Include="Web\LoginResponse.cs" /> + <Compile Include="Web\MachineRegistrationRequest.cs" /> + <Compile Include="Web\MachineRegistrationResponse.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Benchmarks\benchmarks_rgb_lab.csv"> diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationRequest.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationRequest.cs new file mode 100644 index 000000000..5a0f86917 --- /dev/null +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Transport.Web; + +namespace Tango.TCC.BL.Web +{ + public class MachineRegistrationRequest : WebRequestMessage + { + public String SerialNumber { get; set; } + } +} diff --git a/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationResponse.cs b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationResponse.cs new file mode 100644 index 000000000..88ff6599f --- /dev/null +++ b/Software/Visual_Studio/TCC/Tango.TCC.BL/Web/MachineRegistrationResponse.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Transport.Web; + +namespace Tango.TCC.BL.Web +{ + public class MachineRegistrationResponse : WebResponseMessage + { + public List<String> OrganizationMachines { get; set; } + + public MachineRegistrationResponse() + { + OrganizationMachines = new List<string>(); + } + } +} diff --git a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs index eb4600788..fc0272c02 100644 --- a/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs +++ b/Software/Visual_Studio/TCC/Tango.TCC.Service/Controllers/ColorDetectionController.cs @@ -61,6 +61,7 @@ namespace Tango.TCC.Service.Controllers }; } + [JwtTokenFilter] [HttpPost] public ColorDetectionResponse Detect(ColorDetectionRequest request) { @@ -103,5 +104,18 @@ namespace Tango.TCC.Service.Controllers }; } } + + [JwtTokenFilter] + [HttpPost] + public MachineRegistrationResponse Register(MachineRegistrationRequest request) + { + MachineRegistrationResponse response = new MachineRegistrationResponse(); + + response.OrganizationMachines.Add("0002"); + + //throw new AuthenticationException("No such serial number..."); + + return response; + } } } |
