mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
43 lines
989 B
C#
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!"
|
|
});
|
|
}
|
|
}
|
|
}
|