This commit is contained in:
728
2023-03-08 12:53:42 +08:00
parent 96d39d72fb
commit 1e4bb7fd1f
4 changed files with 28 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
rm -rf dbexport
coll=(user soc agenda worker work fund imgsrc txt)
coll=(usr soc agd work fund act aut)
for c in $coll; do
echo exporting ismism.$c to dbexport/$c.json

View File

@@ -1,4 +1,4 @@
coll=(user soc agenda worker work fund imgsrc txt)
coll=(usr soc agd work fund act aut)
for c in $coll; do
echo importing $1/$c.json to ismism.$c

View File

@@ -1,31 +1,31 @@
import { db } from "../src/db.ts"
import { act_c } from "../src/eid/act.ts"
import { aut_c } from "../src/eid/aut.ts"
import { usr_c, usr_u } from "../src/eid/usr.ts"
// import { act_c } from "../src/eid/act.ts"
// import { aut_c } from "../src/eid/aut.ts"
// import { usr_c, usr_u } from "../src/eid/usr.ts"
await db("ismism", true)
const exp = new Date("2023-06-31").getTime()
const actid = [
`ismism${Math.round(Math.random() * 1000000)}`,
`ismism${Math.round(Math.random() * 1000000)}`,
]
// const exp = new Date("2023-06-31").getTime()
// const actid = [
// `ismism${Math.round(Math.random() * 1000000)}`,
// `ismism${Math.round(Math.random() * 1000000)}`,
// ]
const [uid1] = await Promise.all([
usr_c("11111111111", "江苏", "苏州"),
act_c({ _id: actid[0], exp, act: "nbr", uid: 1 }),
aut_c({ _id: 1 }),
])
const [uid2] = await Promise.all([
usr_c("11111111112", "江苏", "苏州"),
act_c({ _id: actid[1], exp, act: "nbr", uid: 2 }),
aut_c({ _id: 2 }),
])
await Promise.all([
usr_u(uid1!, { $set: { nam: "未明子", ref: [1, 2] } }),
usr_u(uid1!, { $unset: { nbr: "" } }),
usr_u(uid2!, { $set: { nam: "张正午", ref: [1, 2] } }),
usr_u(uid2!, { $unset: { nbr: "" } }),
])
// const [uid1] = await Promise.all([
// usr_c("11111111111", "江苏", "苏州"),
// act_c({ _id: actid[0], exp, act: "nbr", uid: 1 }),
// aut_c({ _id: 1 }),
// ])
// const [uid2] = await Promise.all([
// usr_c("11111111112", "江苏", "苏州"),
// act_c({ _id: actid[1], exp, act: "nbr", uid: 2 }),
// aut_c({ _id: 2 }),
// ])
// await Promise.all([
// usr_u(uid1!, { $set: { nam: "未明子", ref: [1, 2] } }),
// usr_u(uid1!, { $unset: { nbr: "" } }),
// usr_u(uid2!, { $set: { nam: "张正午", ref: [1, 2] } }),
// usr_u(uid2!, { $unset: { nbr: "" } }),
// ])
console.log([uid1, uid2], actid)
// console.log([uid1, uid2], actid)

View File

@@ -116,7 +116,7 @@ window.addEventListener("hashchange", () => {
export async function load(
) {
console.log("ismism-20230304")
console.log("ismism-20230308")
console.log(`\n主义主义开发小组成员招募中\n\n发送自我介绍至网站维护邮箱或微信联系 728 万大可\n \n`)
await navpas()
window.dispatchEvent(new Event("hashchange"))