ShadowEditor/ShadowEditor.Server/Controllers/Tools/BackupDatabaseController.cs
2019-12-22 16:15:19 +08:00

43 lines
989 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;
using System.Web.Http.Results;
using System.IO;
using MongoDB.Bson;
using MongoDB.Driver;
using Newtonsoft.Json.Linq;
using ShadowEditor.Server.Base;
using ShadowEditor.Server.Helpers;
using ShadowEditor.Server.CustomAttribute;
namespace ShadowEditor.Server.Controllers.Tools
{
/// <summary>
/// 备份数据库控制器
/// </summary>
/// <returns></returns>
public class BackupDatabaseController : ApiBase
{
/// <summary>
/// 开始执行
/// </summary>
/// <returns></returns>
[HttpPost]
[Authority("ADMINISTRATOR")]
public JsonResult Run()
{
var mongo = new MongoHelper();
return Json(new
{
Code = 200,
Msg = "Backup database successfully!"
});
}
}
}