修改配置编辑不了的问题
This commit is contained in:
1 parent
22b504e53e
commit
2a2f78c81e
42 files changed
+1082
-178
No files matched your search
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
"git.nianxx.cn/wangxuming/NianAIGC/backend/internal/billing"
|
||||
"git.nianxx.cn/wangxuming/NianAIGC/backend/internal/identity"
|
||||
"git.nianxx.cn/wangxuming/NianAIGC/backend/internal/jobs"
|
||||
"git.nianxx.cn/wangxuming/NianAIGC/backend/internal/providers"
|
||||
)
|
||||
|
||||
@@ -21,14 +20,14 @@ type billingHandler struct {
|
||||
authorizer *PlatformAuthorizer
|
||||
service BillingHTTPService
|
||||
accounts BillingAccountStore
|
||||
builder jobs.ProviderJobBuilder
|
||||
builder ProviderCommandBuilder
|
||||
}
|
||||
|
||||
func NewBillingHandler(authorizer *PlatformAuthorizer, service BillingHTTPService, accounts BillingAccountStore) http.Handler {
|
||||
return &billingHandler{authorizer: authorizer, service: service, accounts: accounts}
|
||||
}
|
||||
|
||||
func NewBillingHandlerWithBuilder(authorizer *PlatformAuthorizer, service BillingHTTPService, accounts BillingAccountStore, builder jobs.ProviderJobBuilder) http.Handler {
|
||||
func NewBillingHandlerWithBuilder(authorizer *PlatformAuthorizer, service BillingHTTPService, accounts BillingAccountStore, builder ProviderCommandBuilder) http.Handler {
|
||||
return &billingHandler{authorizer: authorizer, service: service, accounts: accounts, builder: builder}
|
||||
}
|
||||
|
||||
@@ -112,7 +111,7 @@ func (h *billingHandler) quote(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
provider, reqKey := billingString(body["provider"]), billingString(body["reqKey"])
|
||||
parameters := billing.Parameters{}
|
||||
if h.builder.NewID != nil {
|
||||
if h.builder != nil {
|
||||
prepared, err := h.builder.Build(r.Context(), session.User.ID, "", capability, "", body)
|
||||
if err != nil {
|
||||
writeJobError(w, err, false)
|
||||
|
||||
Reference in new issue
Block a user