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', {
27
27
} )
28
28
export type LangsAttributes = { lang_slug : string , lang_name :string , lang_version : string }
29
29
30
- const Submissions = db . define < Sequelize . Instance < SubmissionAttributes > , SubmissionAttributes > ( 'submissions' , {
30
+ const Submissions = db . define < SubmissionInstance , SubmissionAttributes > ( 'submissions' , {
31
31
id : {
32
32
type : Sequelize . INTEGER ,
33
33
autoIncrement : true ,
@@ -57,6 +57,8 @@ export type SubmissionAttributes = {
57
57
outputs ?: Array < string >
58
58
}
59
59
60
+ export type SubmissionInstance = Sequelize . Instance < SubmissionAttributes > & SubmissionAttributes
61
+
60
62
const ApiKeys = db . define ( 'apikeys' , {
61
63
id : {
62
64
type : Sequelize . INTEGER ,
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
64
64
const { url} = await upload ( result )
65
65
66
66
// 2. save the url in db
67
- await Submissions . update ( {
67
+ await Submissions . update ( < any > {
68
68
outputs : [ url ]
69
69
} , {
70
70
where : {
@@ -189,7 +189,7 @@ successListener.on('success', (result: RunResponse) => {
189
189
handleSuccessForSubmission ( result )
190
190
delete runPool [ result . id ]
191
191
}
192
- Submissions . update ( {
192
+ Submissions . update ( < any > {
193
193
end_time : new Date ( )
194
194
} , {
195
195
where : {
You can’t perform that action at this time.
0 commit comments