refactor(backend): use insert instead of save
This commit is contained in:
parent
91c56ceb6e
commit
37a4e5f4fc
6 changed files with 10 additions and 10 deletions
|
|
@ -56,14 +56,14 @@ export default define(meta, async (ps, user) => {
|
|||
}
|
||||
}
|
||||
|
||||
const channel = await Channels.save({
|
||||
const channel = await Channels.insert({
|
||||
id: genId(),
|
||||
createdAt: new Date(),
|
||||
userId: user.id,
|
||||
name: ps.name,
|
||||
description: ps.description || null,
|
||||
bannerId: banner ? banner.id : null,
|
||||
} as Channel);
|
||||
} as Channel).then(x => Channels.findOneOrFail(x.identifiers[0]));
|
||||
|
||||
return await Channels.pack(channel, user);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue