12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using Microsoft.AspNetCore.Mvc;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using HyperCube.Models;
- // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
- namespace HyperCube.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- public class ValuesController : ControllerBase
- {
- // GET: api/<ValuesController>
- [HttpGet]
- public IEnumerable<string> Get()
- {
- return new string[] {};
- }
- // GET api/<ValuesController>/5
- [HttpGet("{id}/{email}")]
- public async Task<string> Get(int id, string email)
- {
- string transactionId = $"not found: {id} {email}";
- var article = ArticleModel.Find(id);
- if (article != null)
- transactionId = await SmartContract.Verify(article);
- return transactionId;
- }
- // POST api/<ValuesController>
- [HttpPost]
- public void Post([FromBody] string value)
- {
- }
- // PUT api/<ValuesController>/5
- [HttpPut("{id}")]
- public void Put(int id, [FromBody] string value)
- {
- }
- // DELETE api/<ValuesController>/5
- [HttpDelete("{id}")]
- public void Delete(int id)
- {
- }
- }
- }
|