Esempio n. 1
0
        public async Task <HttpResponseMessage> Sql(long id)
        {
            var body = await Request.Content.ReadAsStringAsync();

            var context = new ContextImplement(
                sessionStatus: User?.Identity?.IsAuthenticated == true,
                sessionData: User?.Identity?.IsAuthenticated == true,
                apiRequestBody: body);
            var controller = new Pleasanter.Controllers.Api.ExtendedController();
            var result     = controller.Sql(context: context);

            return(result.ToHttpResponse(Request));
        }
Esempio n. 2
0
        public ContentResult Sql()
        {
            var body = default(string);

            using (var reader = new StreamReader(Request.Body)) body = reader.ReadToEnd();
            var context = new ContextImplement(
                sessionStatus: User?.Identity?.IsAuthenticated == true,
                sessionData: User?.Identity?.IsAuthenticated == true,
                apiRequestBody: body);
            var controller = new Pleasanter.Controllers.Api.ExtendedController();
            var result     = controller.Sql(context: context);

            return(result.ToHttpResponse(request: Request));
        }