@ -252,7 +252,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
- name: VersionID
|
- name: ModelVersion
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@ -563,7 +563,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
- name: VersionID
|
- name: ModelVersion
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
|
@ -5450,15 +5450,15 @@ func (c *Client) sendUpdateMapfixModel(ctx context.Context, params UpdateMapfixM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// Encode "VersionID" parameter.
|
// Encode "ModelVersion" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
|
if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
|
||||||
return e.EncodeValue(conv.Int64ToString(params.VersionID))
|
return e.EncodeValue(conv.Int64ToString(params.ModelVersion))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
@ -5858,15 +5858,15 @@ func (c *Client) sendUpdateSubmissionModel(ctx context.Context, params UpdateSub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// Encode "VersionID" parameter.
|
// Encode "ModelVersion" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
|
if err := q.EncodeParam(cfg, func(e uri.Encoder) error {
|
||||||
return e.EncodeValue(conv.Int64ToString(params.VersionID))
|
return e.EncodeValue(conv.Int64ToString(params.ModelVersion))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
|
@ -7769,9 +7769,9 @@ func (s *Server) handleUpdateMapfixModelRequest(args [1]string, argsEscaped bool
|
|||||||
In: "query",
|
In: "query",
|
||||||
}: params.ModelID,
|
}: params.ModelID,
|
||||||
{
|
{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.VersionID,
|
}: params.ModelVersion,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
@ -8392,9 +8392,9 @@ func (s *Server) handleUpdateSubmissionModelRequest(args [1]string, argsEscaped
|
|||||||
In: "query",
|
In: "query",
|
||||||
}: params.ModelID,
|
}: params.ModelID,
|
||||||
{
|
{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.VersionID,
|
}: params.ModelVersion,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
|
@ -3791,9 +3791,9 @@ func decodeSetSubmissionCompletedParams(args [1]string, argsEscaped bool, r *htt
|
|||||||
// UpdateMapfixModelParams is parameters of updateMapfixModel operation.
|
// UpdateMapfixModelParams is parameters of updateMapfixModel operation.
|
||||||
type UpdateMapfixModelParams struct {
|
type UpdateMapfixModelParams struct {
|
||||||
// The unique identifier for a mapfix.
|
// The unique identifier for a mapfix.
|
||||||
MapfixID int64
|
MapfixID int64
|
||||||
ModelID int64
|
ModelID int64
|
||||||
VersionID int64
|
ModelVersion int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackUpdateMapfixModelParams(packed middleware.Parameters) (params UpdateMapfixModelParams) {
|
func unpackUpdateMapfixModelParams(packed middleware.Parameters) (params UpdateMapfixModelParams) {
|
||||||
@ -3813,10 +3813,10 @@ func unpackUpdateMapfixModelParams(packed middleware.Parameters) (params UpdateM
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.VersionID = packed[key].(int64)
|
params.ModelVersion = packed[key].(int64)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -3904,10 +3904,10 @@ func decodeUpdateMapfixModelParams(args [1]string, argsEscaped bool, r *http.Req
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: VersionID.
|
// Decode query: ModelVersion.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -3924,7 +3924,7 @@ func decodeUpdateMapfixModelParams(args [1]string, argsEscaped bool, r *http.Req
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.VersionID = c
|
params.ModelVersion = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -3935,7 +3935,7 @@ func decodeUpdateMapfixModelParams(args [1]string, argsEscaped bool, r *http.Req
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
@ -4080,7 +4080,7 @@ type UpdateSubmissionModelParams struct {
|
|||||||
// The unique identifier for a submission.
|
// The unique identifier for a submission.
|
||||||
SubmissionID int64
|
SubmissionID int64
|
||||||
ModelID int64
|
ModelID int64
|
||||||
VersionID int64
|
ModelVersion int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackUpdateSubmissionModelParams(packed middleware.Parameters) (params UpdateSubmissionModelParams) {
|
func unpackUpdateSubmissionModelParams(packed middleware.Parameters) (params UpdateSubmissionModelParams) {
|
||||||
@ -4100,10 +4100,10 @@ func unpackUpdateSubmissionModelParams(packed middleware.Parameters) (params Upd
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.VersionID = packed[key].(int64)
|
params.ModelVersion = packed[key].(int64)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -4191,10 +4191,10 @@ func decodeUpdateSubmissionModelParams(args [1]string, argsEscaped bool, r *http
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: VersionID.
|
// Decode query: ModelVersion.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -4211,7 +4211,7 @@ func decodeUpdateSubmissionModelParams(args [1]string, argsEscaped bool, r *http
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.VersionID = c
|
params.ModelVersion = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -4222,7 +4222,7 @@ func decodeUpdateSubmissionModelParams(args [1]string, argsEscaped bool, r *http
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "VersionID",
|
Name: "ModelVersion",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ func (svc *Service) UpdateMapfixModel(ctx context.Context, params api.UpdateMapf
|
|||||||
// check if Status is ChangesRequested|Submitted|UnderConstruction
|
// check if Status is ChangesRequested|Submitted|UnderConstruction
|
||||||
pmap := datastore.Optional()
|
pmap := datastore.Optional()
|
||||||
pmap.AddNotNil("asset_id", params.ModelID)
|
pmap.AddNotNil("asset_id", params.ModelID)
|
||||||
pmap.AddNotNil("asset_version", params.VersionID)
|
pmap.AddNotNil("asset_version", params.ModelVersion)
|
||||||
//always reset completed when model changes
|
//always reset completed when model changes
|
||||||
pmap.Add("completed", false)
|
pmap.Add("completed", false)
|
||||||
return svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusChangesRequested, model.MapfixStatusSubmitted, model.MapfixStatusUnderConstruction}, pmap)
|
return svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusChangesRequested, model.MapfixStatusSubmitted, model.MapfixStatusUnderConstruction}, pmap)
|
||||||
|
@ -247,7 +247,7 @@ func (svc *Service) UpdateSubmissionModel(ctx context.Context, params api.Update
|
|||||||
// check if Status is ChangesRequested|Submitted|UnderConstruction
|
// check if Status is ChangesRequested|Submitted|UnderConstruction
|
||||||
pmap := datastore.Optional()
|
pmap := datastore.Optional()
|
||||||
pmap.AddNotNil("asset_id", params.ModelID)
|
pmap.AddNotNil("asset_id", params.ModelID)
|
||||||
pmap.AddNotNil("asset_version", params.VersionID)
|
pmap.AddNotNil("asset_version", params.ModelVersion)
|
||||||
//always reset completed when model changes
|
//always reset completed when model changes
|
||||||
pmap.Add("completed", false)
|
pmap.Add("completed", false)
|
||||||
return svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusChangesRequested, model.SubmissionStatusSubmitted, model.SubmissionStatusUnderConstruction}, pmap)
|
return svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusChangesRequested, model.SubmissionStatusSubmitted, model.SubmissionStatusUnderConstruction}, pmap)
|
||||||
|
Reference in New Issue
Block a user