File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const Langs = db.define('langs', {
2727} )
2828export type LangsAttributes = { lang_slug : string , lang_name :string , lang_version : string }
2929
30- const Submissions = db . define < Sequelize . Instance < SubmissionAttributes > , SubmissionAttributes > ( 'submissions' , {
30+ const Submissions = db . define < SubmissionInstance , SubmissionAttributes > ( 'submissions' , {
3131 id : {
3232 type : Sequelize . INTEGER ,
3333 autoIncrement : true ,
@@ -57,6 +57,8 @@ export type SubmissionAttributes = {
5757 outputs ?: Array < string >
5858}
5959
60+ export type SubmissionInstance = Sequelize . Instance < SubmissionAttributes > & SubmissionAttributes
61+
6062const ApiKeys = db . define ( 'apikeys' , {
6163 id : {
6264 type : Sequelize . INTEGER ,
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
6464 const { url} = await upload ( result )
6565
6666 // 2. save the url in db
67- await Submissions . update ( {
67+ await Submissions . update ( < any > {
6868 outputs : [ url ]
6969 } , {
7070 where : {
@@ -189,7 +189,7 @@ successListener.on('success', (result: RunResponse) => {
189189 handleSuccessForSubmission ( result )
190190 delete runPool [ result . id ]
191191 }
192- Submissions . update ( {
192+ Submissions . update ( < any > {
193193 end_time : new Date ( )
194194 } , {
195195 where : {
You can’t perform that action at this time.
0 commit comments