's'
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { postSalonApi } from "@/app/lib/salonApi";
|
||||
import { getNowChinaStr } from "@/app/lib/dates";
|
||||
import { getAdminToken } from "@/app/lib/pocketbase/admin";
|
||||
import { getPocketBaseConfig } from "@/config/services.config";
|
||||
import { COOKIE_NAME } from "@/app/lib/auth-cookie";
|
||||
@@ -45,6 +46,7 @@ export async function POST(request: NextRequest) {
|
||||
const whyJoin = String(formData.why_join || "").trim();
|
||||
const region = String(formData.region || "").trim();
|
||||
const availableTime = String(formData.available_time || "").trim();
|
||||
const meetupdate = String(formData.meetupdate || "").trim();
|
||||
const isVolunteer = !!formData.is_volunteer;
|
||||
const qualify = !!formData.qualify; // 女性且小红书帖子>10 时自动通过审核
|
||||
/** reason 仅存自我介绍,不合并其他字段 */
|
||||
@@ -107,6 +109,7 @@ export async function POST(request: NextRequest) {
|
||||
is_volunteer: isVolunteer,
|
||||
qualify,
|
||||
userInfo: userInfo || "",
|
||||
meetupdate: meetupdate || "",
|
||||
};
|
||||
if (phone.trim()) {
|
||||
record.phone = phone.trim();
|
||||
@@ -199,6 +202,10 @@ async function tryPocketBaseDirect(
|
||||
first_time: record.first_time ?? "",
|
||||
userInfo: record.userInfo ?? "",
|
||||
};
|
||||
if (record.meetupdate != null && String(record.meetupdate).trim()) {
|
||||
body.meetupdate = String(record.meetupdate).trim();
|
||||
}
|
||||
body.submitted_at_cn = getNowChinaStr();
|
||||
if (record.phone != null && String(record.phone).trim()) {
|
||||
body.phone = record.phone;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user