mirror of https://git.sr.ht/~sircmpwn/git.sr.ht
api/graph: use core-go's s3.Enabled
This commit is contained in:
parent
31a3186618
commit
d3ff388b65
|
@ -861,11 +861,8 @@ func (r *mutationResolver) DeleteUser(ctx context.Context) (int, error) {
|
|||
// Version is the resolver for the version field.
|
||||
func (r *queryResolver) Version(ctx context.Context) (*model.Version, error) {
|
||||
conf := config.ForContext(ctx)
|
||||
upstream, _ := conf.Get("objects", "s3-upstream")
|
||||
accessKey, _ := conf.Get("objects", "s3-access-key")
|
||||
secretKey, _ := conf.Get("objects", "s3-secret-key")
|
||||
bucket, _ := conf.Get("git.sr.ht", "s3-bucket")
|
||||
artifacts := upstream != "" && accessKey != "" && secretKey != "" && bucket != ""
|
||||
artifacts := s3.Enabled(conf) && bucket != ""
|
||||
|
||||
sshUser, _ := conf.Get("git.sr.ht::dispatch", "/usr/bin/gitsrht-keys")
|
||||
sshUser = strings.Split(sshUser, ":")[0]
|
||||
|
|
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.sr.ht/~sircmpwn/git.sr.ht
|
|||
go 1.16
|
||||
|
||||
require (
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240124105042-864816cfbc0c
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240202110806-942e19c3517b
|
||||
git.sr.ht/~sircmpwn/dowork v0.0.0-20221010085743-46c4299d76a1
|
||||
git.sr.ht/~sircmpwn/scm.sr.ht/srht-keys v0.0.0-20230322101108-c39456ffb47d
|
||||
git.sr.ht/~turminal/go-fnmatch v0.0.0-20211021204744-1a55764af6de
|
||||
|
|
4
go.sum
4
go.sum
|
@ -598,8 +598,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
|
|||
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
|
||||
git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc=
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20201005173246-a9e49d17a1e6/go.mod h1:HpPX22ilJUWKOA4NDhrOcIyblQhdiKHPg4oMJFYdh0Y=
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240124105042-864816cfbc0c h1:o5jKIK7BJBEGSuY9ux4FREZry4aJV3DgI41iP6uf5xY=
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240124105042-864816cfbc0c/go.mod h1:OovCpg5LsbYJjmDTpk5wUgHM4tUor736Pmxekm9BUcQ=
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240202110806-942e19c3517b h1:0YUTZl7n4565I6ahRnn+gvSFsh5S0ag7vvuE6xGuhSs=
|
||||
git.sr.ht/~sircmpwn/core-go v0.0.0-20240202110806-942e19c3517b/go.mod h1:OovCpg5LsbYJjmDTpk5wUgHM4tUor736Pmxekm9BUcQ=
|
||||
git.sr.ht/~sircmpwn/dowork v0.0.0-20221010085743-46c4299d76a1 h1:EvPKkneKkF/f7zEgKPqIZVyj3jWO8zSmsBOvMhAGqMA=
|
||||
git.sr.ht/~sircmpwn/dowork v0.0.0-20221010085743-46c4299d76a1/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
|
||||
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
|
||||
|
|
Loading…
Reference in New Issue