Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
# Conflicts:
#	schemas/tags.graphql
  • Loading branch information
Vilsol committed Jan 6, 2024
2 parents 65bcbc9 + 4aa7cb0 commit 004a8c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/postgres/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func NewModQuery(ctx context.Context, filter *models.ModFilter, unapproved bool,
}
}

return query.Debug()
return query
}

func GetModByIDOrReference(ctx context.Context, modIDOrReference string) *Mod {
Expand Down
6 changes: 6 additions & 0 deletions redis/jobs/consumers/consumer_scan_mod_on_virus_total.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ func ScanModOnVirusTotalConsumer(ctx context.Context, payload []byte) error {
log.Info().Msgf("starting virus scan of mod %s version %s", task.ModID, task.VersionID)

version := postgres.GetVersion(ctx, task.VersionID)
// Version got deleted?
if version == nil {
log.Error().Msgf("mod %s version %s does not exist to be scanned", task.ModID, task.VersionID)
return nil
}

link := storage.GenerateDownloadLink(version.Key)

response, _ := http.Get(link)
Expand Down
2 changes: 1 addition & 1 deletion schemas/bootstrap_version.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extend type Query {
### Mutations

extend type Mutation {
createBootstrapVersion(bootstrapVersion: NewBootstrapVersion!): BootstrapVersion @isLoggedIn
createBootstrapVersion(bootstrapVersion: NewBootstrapVersion!): BootstrapVersion @canEditBootstrapVersions @isLoggedIn
updateBootstrapVersion(bootstrapVersionId: BootstrapVersionID!, bootstrapVersion: UpdateBootstrapVersion!): BootstrapVersion! @canEditBootstrapVersions @isLoggedIn
deleteBootstrapVersion(bootstrapVersionId: BootstrapVersionID!): Boolean! @canEditBootstrapVersions @isLoggedIn
}
2 changes: 1 addition & 1 deletion schemas/sml_version.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ extend type Query {
### Mutations

extend type Mutation {
createSMLVersion(smlVersion: NewSMLVersion!): SMLVersion @isLoggedIn
createSMLVersion(smlVersion: NewSMLVersion!): SMLVersion @canEditSMLVersions @isLoggedIn
updateSMLVersion(smlVersionId: SMLVersionID!, smlVersion: UpdateSMLVersion!): SMLVersion! @canEditSMLVersions @isLoggedIn
deleteSMLVersion(smlVersionId: SMLVersionID!): Boolean! @canEditSMLVersions @isLoggedIn
}

0 comments on commit 004a8c7

Please sign in to comment.