-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: random key for each collection job (#1135)
* fix: random key for each collection job Squashed commit of the following: commit 12ae1e0 Author: Mx. Corey Frang <gnarf37@gmail.com> Date: Mon Jun 17 14:19:08 2024 -0400 got a little further, still blocked on tests commit d54ffad Author: Mx. Corey Frang <gnarf37@gmail.com> Date: Mon Jun 17 11:28:10 2024 -0400 debuggering commit 7bfa8f8 Author: Mx. Corey Frang <gnarf37@gmail.com> Date: Thu May 30 11:59:02 2024 -0400 turbo logging trying to track down a bug commit 842a459 Author: Mx. Corey Frang <gnarf37@gmail.com> Date: Wed May 29 12:21:15 2024 -0400 remove server abstraction layer * update to tests, not sure why needed some of these * use node side uuid generation * switch to beforeValidate hook * only update secret if not there * remove some minor diff changes from debugging * Update server/models/services/CollectionJobService.js Co-authored-by: Howard Edwards <howarde.edwards@gmail.com> * leftover review feedback --------- Co-authored-by: Howard Edwards <howarde.edwards@gmail.com>
- Loading branch information
Showing
12 changed files
with
347 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
server/migrations/20240525041559-addCollectionJobSecret.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
const uuid = require('uuid'); | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
return queryInterface.sequelize.transaction(async transaction => { | ||
await queryInterface.addColumn( | ||
'CollectionJob', | ||
'secret', | ||
{ | ||
type: Sequelize.DataTypes.UUID, | ||
allowNull: false, | ||
defaultValue: uuid.NIL | ||
}, | ||
{ transaction } | ||
); | ||
}); | ||
}, | ||
async down(queryInterface) { | ||
return queryInterface.sequelize.transaction(async transaction => { | ||
await queryInterface.removeColumn('CollectionJob', 'secret', { | ||
transaction | ||
}); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.