Skip to content

Commit

Permalink
Fix adding offices
Browse files Browse the repository at this point in the history
  • Loading branch information
joonashak committed Jul 24, 2023
1 parent 1a5455b commit 0954874
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/controllers/db.controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ exports.getScheduledMessageId = async (date, channelId, usergroupId) => {
*/
exports.addOffice = async (officeName, officeEmoji) => {
try {
return await Office.upsert({
return await Office.create({
officeName: officeName,
officeEmoji: officeEmoji,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
async up(queryInterface) {
await queryInterface.bulkInsert("Offices", [
{
id: 1,
officeName: "Default Office",
createdAt: new Date(),
updatedAt: new Date(),
Expand Down

0 comments on commit 0954874

Please sign in to comment.