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