fix creaste
parent
767c040634
commit
1e445c25dc
|
@ -24,31 +24,31 @@ const create_thread = async (msg, respond, socket, io) => {
|
||||||
// set up permissions
|
// set up permissions
|
||||||
if (!msg.permissions || !msg.permissions.view_limited) {
|
if (!msg.permissions || !msg.permissions.view_limited) {
|
||||||
await db.query(
|
await db.query(
|
||||||
`insert into permissions (thread, type, flexible, permission, value)
|
`insert into permissions (thread, type, mutable, permission, value)
|
||||||
values (?, ?, ?, ?, ?)`,
|
values (?, ?, ?, ?, ?)`,
|
||||||
[thread_id, "everyone", false, "view", "true"]
|
[thread_id, "everyone", false, "view", "true"]
|
||||||
);
|
);
|
||||||
if (!msg.permissions || !msg.permissions.post_limited) {
|
if (!msg.permissions || !msg.permissions.post_limited) {
|
||||||
await db.query(
|
await db.query(
|
||||||
`insert into permissions (thread, type, flexible, permission, value)
|
`insert into permissions (thread, type, mutable, permission, value)
|
||||||
values (?, ?, ?, ?, ?)`,
|
values (?, ?, ?, ?, ?)`,
|
||||||
[thread_id, "everyone", false, "post", "true"]
|
[thread_id, "everyone", false, "post", "true"]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
await db.query(
|
await db.query(
|
||||||
`insert into permissions (thread, type, flexible, permission, value)
|
`insert into permissions (thread, type, mutable, permission, value)
|
||||||
values (?, ?, ?, ?, ?)`,
|
values (?, ?, ?, ?, ?)`,
|
||||||
[thread_id, "members", false, "post", "true"]
|
[thread_id, "members", false, "post", "true"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await db.query(
|
await db.query(
|
||||||
`insert into permissions (thread, type, flexible, permission, value)
|
`insert into permissions (thread, type, mutable, permission, value)
|
||||||
values (?, ?, ?, ?, ?)`,
|
values (?, ?, ?, ?, ?)`,
|
||||||
[thread_id, "members", false, "view", "true"]
|
[thread_id, "members", false, "view", "true"]
|
||||||
);
|
);
|
||||||
await db.query(
|
await db.query(
|
||||||
`insert into permissions (thread, type, flexible, permission, value)
|
`insert into permissions (thread, type, mutable, permission, value)
|
||||||
values (?, ?, ?, ?, ?)`,
|
values (?, ?, ?, ?, ?)`,
|
||||||
[thread_id, "members", false, "post", "true"]
|
[thread_id, "members", false, "post", "true"]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue