Compare commits

...
9 Commits
Author SHA1 Message Date
ZhangJunyu 5530eb1bcf add command timeout
continuous-integration/drone/push Build is passing
2022-03-19 17:18:06 +08:00
ZhangJunyu 2077407958 timezone change
continuous-integration/drone/push Build is passing
2022-02-25 05:06:12 +08:00
ZhangJunyu c69d3e6a6c timezone fix
continuous-integration/drone/push Build is passing
2022-02-25 02:46:01 +08:00
ZhangJunyu 1210245660 change timezone
continuous-integration/drone/push Build is passing
2022-02-25 02:21:00 +08:00
ZhangJunyu 1cf453948b debug
continuous-integration/drone/push Build is passing
2022-02-25 02:13:29 +08:00
ZhangJunyu 10cbc27fd7 change message ID
continuous-integration/drone/push Build is passing
2022-02-24 22:04:07 +08:00
ZhangJunyu d509a43474 add admin account
continuous-integration/drone/push Build is passing
2022-02-23 17:48:19 +08:00
ZhangJunyu e847be3369 change title
continuous-integration/drone/push Build is passing
2022-02-23 17:26:33 +08:00
ZhangJunyu 8467200774 migrate into net6.0
continuous-integration/drone/push Build is passing
2022-02-23 17:20:32 +08:00
6 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ namespace _2021_backend.Controllers
var stu = context.Students.FirstOrDefault(e => e.Stuid == stuid);
if (stu == null) return Ok(ApiResponse.Error("INVALID_STUID"));
else if (DateTime.Now - stu.LastCaptchaTime < TimeSpan.FromMinutes(1)) return Ok(ApiResponse.Error("ALREADY_SENT"));
else if (DateTime.Now - stu.LastCaptchaTime < TimeSpan.FromMinutes(1)) return Ok(ApiResponse.Error($"ALREADY_SENT"));
var result = await TencentSMS.Send(context, SMSType.Captcha, stu, "smsbot");
if (!result) return Ok(ApiResponse.Error("SEND_ERROR"));
return Ok(ApiResponse.Success("success"));
+2 -2
View File
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["2021-backend.csproj", ""]
RUN dotnet restore "./2021-backend.csproj"
+2 -2
View File
@@ -6,7 +6,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - 2021 精品活动后台</title>
<title>@ViewData["Title"] - 2022 3D打印后台</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
</head>
@@ -14,7 +14,7 @@
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container-fluid">
<a class="navbar-brand" asp-area="" asp-page="/Index">2021纳新后台</a>
<a class="navbar-brand" asp-area="" asp-page="/Index">2022 3D打印后台</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
+2 -2
View File
@@ -55,10 +55,10 @@ namespace _2021_backend
context.SaveChanges();
}
var usr = new User();
usr.Name = config["ADMIN_USERNAME"];
usr.Name = "administrator";
usr.isManager = true;
usr.Secret = EvaCryptoHelper.Password2Secret(config["ADMIN_PASSWORD"]);
usr.stuID = "zjueva";
usr.stuID = config["ADMIN_USERNAME"]; ;
Console.WriteLine(usr.Id.ToString());
context.Users.Add(usr);
context.SaveChanges();
+1 -1
View File
@@ -78,7 +78,7 @@ namespace _2021_backend
});
services.AddDbContext<BackendContext>(options =>
options.UseNpgsql($"Host={Configuration["DB_HOST"]};Port={Configuration["DB_PORT"]};Database={Configuration["DB_NAME"]};Username={Configuration["DB_USER"]};Password={Configuration["DB_PASSWORD"]}"));
options.UseNpgsql($"Host={Configuration["DB_HOST"]};Port={Configuration["DB_PORT"]};Database={Configuration["DB_NAME"]};Username={Configuration["DB_USER"]};Password={Configuration["DB_PASSWORD"]};CommandTimeout=500"));
}
+1 -1
View File
@@ -12,7 +12,7 @@
"SMS_APPID": "1400562126",
"SMS_ID_ACCPET": "1163892",
"SMS_ID_REJECT": "1089595",
"SMS_ID_SUBMITTED": "1163892",
"SMS_ID_SUBMITTED": "1313079",
"SMS_ID_TIMESET": "1232109",
"SMS_ID_TIMESELECT": "1232577",
"SMS_ID_CAPTCHA": "1312236",