Implement Submission.StatusMessage as Audit Event #120
openapi-internal.yaml
pkg
internal
model
service
service_internal
validation
api/src
src
web/src/app
mapfixes/[mapfixId]
submissions/[submissionId]
ts
@ -97,7 +97,7 @@ paths:
|
|||||||
- Mapfixes
|
- Mapfixes
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/MapfixID'
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
- name: StatusMessage
|
- name: ErrorMessage
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@ -138,7 +138,7 @@ paths:
|
|||||||
- Mapfixes
|
- Mapfixes
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/MapfixID'
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
- name: StatusMessage
|
- name: ErrorMessage
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@ -283,7 +283,7 @@ paths:
|
|||||||
- Submissions
|
- Submissions
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/SubmissionID'
|
- $ref: '#/components/parameters/SubmissionID'
|
||||||
- name: StatusMessage
|
- name: ErrorMessage
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
@ -324,7 +324,7 @@ paths:
|
|||||||
- Submissions
|
- Submissions
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/SubmissionID'
|
- $ref: '#/components/parameters/SubmissionID'
|
||||||
- name: StatusMessage
|
- name: ErrorMessage
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
|
@ -269,15 +269,15 @@ func (c *Client) sendActionMapfixAccepted(ctx context.Context, params ActionMapf
|
|||||||
stage = "EncodeQueryParams"
|
stage = "EncodeQueryParams"
|
||||||
q := uri.NewQueryEncoder()
|
q := uri.NewQueryEncoder()
|
||||||
{
|
{
|
||||||
// Encode "StatusMessage" parameter.
|
// Encode "ErrorMessage" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
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.StringToString(params.StatusMessage))
|
return e.EncodeValue(conv.StringToString(params.ErrorMessage))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
@ -378,15 +378,15 @@ func (c *Client) sendActionMapfixRequestChanges(ctx context.Context, params Acti
|
|||||||
stage = "EncodeQueryParams"
|
stage = "EncodeQueryParams"
|
||||||
q := uri.NewQueryEncoder()
|
q := uri.NewQueryEncoder()
|
||||||
{
|
{
|
||||||
// Encode "StatusMessage" parameter.
|
// Encode "ErrorMessage" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
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.StringToString(params.StatusMessage))
|
return e.EncodeValue(conv.StringToString(params.ErrorMessage))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
@ -887,15 +887,15 @@ func (c *Client) sendActionSubmissionAccepted(ctx context.Context, params Action
|
|||||||
stage = "EncodeQueryParams"
|
stage = "EncodeQueryParams"
|
||||||
q := uri.NewQueryEncoder()
|
q := uri.NewQueryEncoder()
|
||||||
{
|
{
|
||||||
// Encode "StatusMessage" parameter.
|
// Encode "ErrorMessage" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
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.StringToString(params.StatusMessage))
|
return e.EncodeValue(conv.StringToString(params.ErrorMessage))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
@ -996,15 +996,15 @@ func (c *Client) sendActionSubmissionRequestChanges(ctx context.Context, params
|
|||||||
stage = "EncodeQueryParams"
|
stage = "EncodeQueryParams"
|
||||||
q := uri.NewQueryEncoder()
|
q := uri.NewQueryEncoder()
|
||||||
{
|
{
|
||||||
// Encode "StatusMessage" parameter.
|
// Encode "ErrorMessage" parameter.
|
||||||
cfg := uri.QueryParameterEncodingConfig{
|
cfg := uri.QueryParameterEncodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
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.StringToString(params.StatusMessage))
|
return e.EncodeValue(conv.StringToString(params.ErrorMessage))
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return res, errors.Wrap(err, "encode query")
|
return res, errors.Wrap(err, "encode query")
|
||||||
}
|
}
|
||||||
|
@ -129,9 +129,9 @@ func (s *Server) handleActionMapfixAcceptedRequest(args [1]string, argsEscaped b
|
|||||||
In: "path",
|
In: "path",
|
||||||
}: params.MapfixID,
|
}: params.MapfixID,
|
||||||
{
|
{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.StatusMessage,
|
}: params.ErrorMessage,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
@ -282,9 +282,9 @@ func (s *Server) handleActionMapfixRequestChangesRequest(args [1]string, argsEsc
|
|||||||
In: "path",
|
In: "path",
|
||||||
}: params.MapfixID,
|
}: params.MapfixID,
|
||||||
{
|
{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.StatusMessage,
|
}: params.ErrorMessage,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
@ -1039,9 +1039,9 @@ func (s *Server) handleActionSubmissionAcceptedRequest(args [1]string, argsEscap
|
|||||||
In: "path",
|
In: "path",
|
||||||
}: params.SubmissionID,
|
}: params.SubmissionID,
|
||||||
{
|
{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.StatusMessage,
|
}: params.ErrorMessage,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
@ -1192,9 +1192,9 @@ func (s *Server) handleActionSubmissionRequestChangesRequest(args [1]string, arg
|
|||||||
In: "path",
|
In: "path",
|
||||||
}: params.SubmissionID,
|
}: params.SubmissionID,
|
||||||
{
|
{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}: params.StatusMessage,
|
}: params.ErrorMessage,
|
||||||
},
|
},
|
||||||
Raw: r,
|
Raw: r,
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,8 @@ import (
|
|||||||
// ActionMapfixAcceptedParams is parameters of actionMapfixAccepted operation.
|
// ActionMapfixAcceptedParams is parameters of actionMapfixAccepted operation.
|
||||||
type ActionMapfixAcceptedParams struct {
|
type ActionMapfixAcceptedParams struct {
|
||||||
// The unique identifier for a submission.
|
// The unique identifier for a submission.
|
||||||
MapfixID int64
|
MapfixID int64
|
||||||
StatusMessage string
|
ErrorMessage string
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackActionMapfixAcceptedParams(packed middleware.Parameters) (params ActionMapfixAcceptedParams) {
|
func unpackActionMapfixAcceptedParams(packed middleware.Parameters) (params ActionMapfixAcceptedParams) {
|
||||||
@ -32,10 +32,10 @@ func unpackActionMapfixAcceptedParams(packed middleware.Parameters) (params Acti
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.StatusMessage = packed[key].(string)
|
params.ErrorMessage = packed[key].(string)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -104,10 +104,10 @@ func decodeActionMapfixAcceptedParams(args [1]string, argsEscaped bool, r *http.
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: StatusMessage.
|
// Decode query: ErrorMessage.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ func decodeActionMapfixAcceptedParams(args [1]string, argsEscaped bool, r *http.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.StatusMessage = c
|
params.ErrorMessage = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -138,7 +138,7 @@ func decodeActionMapfixAcceptedParams(args [1]string, argsEscaped bool, r *http.
|
|||||||
Email: false,
|
Email: false,
|
||||||
Hostname: false,
|
Hostname: false,
|
||||||
Regex: nil,
|
Regex: nil,
|
||||||
}).Validate(string(params.StatusMessage)); err != nil {
|
}).Validate(string(params.ErrorMessage)); err != nil {
|
||||||
return errors.Wrap(err, "string")
|
return errors.Wrap(err, "string")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -151,7 +151,7 @@ func decodeActionMapfixAcceptedParams(args [1]string, argsEscaped bool, r *http.
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
@ -162,8 +162,8 @@ func decodeActionMapfixAcceptedParams(args [1]string, argsEscaped bool, r *http.
|
|||||||
// ActionMapfixRequestChangesParams is parameters of actionMapfixRequestChanges operation.
|
// ActionMapfixRequestChangesParams is parameters of actionMapfixRequestChanges operation.
|
||||||
type ActionMapfixRequestChangesParams struct {
|
type ActionMapfixRequestChangesParams struct {
|
||||||
// The unique identifier for a submission.
|
// The unique identifier for a submission.
|
||||||
MapfixID int64
|
MapfixID int64
|
||||||
StatusMessage string
|
ErrorMessage string
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackActionMapfixRequestChangesParams(packed middleware.Parameters) (params ActionMapfixRequestChangesParams) {
|
func unpackActionMapfixRequestChangesParams(packed middleware.Parameters) (params ActionMapfixRequestChangesParams) {
|
||||||
@ -176,10 +176,10 @@ func unpackActionMapfixRequestChangesParams(packed middleware.Parameters) (param
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.StatusMessage = packed[key].(string)
|
params.ErrorMessage = packed[key].(string)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -248,10 +248,10 @@ func decodeActionMapfixRequestChangesParams(args [1]string, argsEscaped bool, r
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: StatusMessage.
|
// Decode query: ErrorMessage.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ func decodeActionMapfixRequestChangesParams(args [1]string, argsEscaped bool, r
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.StatusMessage = c
|
params.ErrorMessage = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -282,7 +282,7 @@ func decodeActionMapfixRequestChangesParams(args [1]string, argsEscaped bool, r
|
|||||||
Email: false,
|
Email: false,
|
||||||
Hostname: false,
|
Hostname: false,
|
||||||
Regex: nil,
|
Regex: nil,
|
||||||
}).Validate(string(params.StatusMessage)); err != nil {
|
}).Validate(string(params.ErrorMessage)); err != nil {
|
||||||
return errors.Wrap(err, "string")
|
return errors.Wrap(err, "string")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -295,7 +295,7 @@ func decodeActionMapfixRequestChangesParams(args [1]string, argsEscaped bool, r
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
@ -761,8 +761,8 @@ func decodeActionOperationFailedParams(args [1]string, argsEscaped bool, r *http
|
|||||||
// ActionSubmissionAcceptedParams is parameters of actionSubmissionAccepted operation.
|
// ActionSubmissionAcceptedParams is parameters of actionSubmissionAccepted operation.
|
||||||
type ActionSubmissionAcceptedParams struct {
|
type ActionSubmissionAcceptedParams struct {
|
||||||
// The unique identifier for a submission.
|
// The unique identifier for a submission.
|
||||||
SubmissionID int64
|
SubmissionID int64
|
||||||
StatusMessage string
|
ErrorMessage string
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackActionSubmissionAcceptedParams(packed middleware.Parameters) (params ActionSubmissionAcceptedParams) {
|
func unpackActionSubmissionAcceptedParams(packed middleware.Parameters) (params ActionSubmissionAcceptedParams) {
|
||||||
@ -775,10 +775,10 @@ func unpackActionSubmissionAcceptedParams(packed middleware.Parameters) (params
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.StatusMessage = packed[key].(string)
|
params.ErrorMessage = packed[key].(string)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -847,10 +847,10 @@ func decodeActionSubmissionAcceptedParams(args [1]string, argsEscaped bool, r *h
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: StatusMessage.
|
// Decode query: ErrorMessage.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -867,7 +867,7 @@ func decodeActionSubmissionAcceptedParams(args [1]string, argsEscaped bool, r *h
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.StatusMessage = c
|
params.ErrorMessage = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -881,7 +881,7 @@ func decodeActionSubmissionAcceptedParams(args [1]string, argsEscaped bool, r *h
|
|||||||
Email: false,
|
Email: false,
|
||||||
Hostname: false,
|
Hostname: false,
|
||||||
Regex: nil,
|
Regex: nil,
|
||||||
}).Validate(string(params.StatusMessage)); err != nil {
|
}).Validate(string(params.ErrorMessage)); err != nil {
|
||||||
return errors.Wrap(err, "string")
|
return errors.Wrap(err, "string")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -894,7 +894,7 @@ func decodeActionSubmissionAcceptedParams(args [1]string, argsEscaped bool, r *h
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
@ -905,8 +905,8 @@ func decodeActionSubmissionAcceptedParams(args [1]string, argsEscaped bool, r *h
|
|||||||
// ActionSubmissionRequestChangesParams is parameters of actionSubmissionRequestChanges operation.
|
// ActionSubmissionRequestChangesParams is parameters of actionSubmissionRequestChanges operation.
|
||||||
type ActionSubmissionRequestChangesParams struct {
|
type ActionSubmissionRequestChangesParams struct {
|
||||||
// The unique identifier for a submission.
|
// The unique identifier for a submission.
|
||||||
SubmissionID int64
|
SubmissionID int64
|
||||||
StatusMessage string
|
ErrorMessage string
|
||||||
}
|
}
|
||||||
|
|
||||||
func unpackActionSubmissionRequestChangesParams(packed middleware.Parameters) (params ActionSubmissionRequestChangesParams) {
|
func unpackActionSubmissionRequestChangesParams(packed middleware.Parameters) (params ActionSubmissionRequestChangesParams) {
|
||||||
@ -919,10 +919,10 @@ func unpackActionSubmissionRequestChangesParams(packed middleware.Parameters) (p
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
key := middleware.ParameterKey{
|
key := middleware.ParameterKey{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
}
|
}
|
||||||
params.StatusMessage = packed[key].(string)
|
params.ErrorMessage = packed[key].(string)
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
@ -991,10 +991,10 @@ func decodeActionSubmissionRequestChangesParams(args [1]string, argsEscaped bool
|
|||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Decode query: StatusMessage.
|
// Decode query: ErrorMessage.
|
||||||
if err := func() error {
|
if err := func() error {
|
||||||
cfg := uri.QueryParameterDecodingConfig{
|
cfg := uri.QueryParameterDecodingConfig{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
Style: uri.QueryStyleForm,
|
Style: uri.QueryStyleForm,
|
||||||
Explode: true,
|
Explode: true,
|
||||||
}
|
}
|
||||||
@ -1011,7 +1011,7 @@ func decodeActionSubmissionRequestChangesParams(args [1]string, argsEscaped bool
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.StatusMessage = c
|
params.ErrorMessage = c
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -1025,7 +1025,7 @@ func decodeActionSubmissionRequestChangesParams(args [1]string, argsEscaped bool
|
|||||||
Email: false,
|
Email: false,
|
||||||
Hostname: false,
|
Hostname: false,
|
||||||
Regex: nil,
|
Regex: nil,
|
||||||
}).Validate(string(params.StatusMessage)); err != nil {
|
}).Validate(string(params.ErrorMessage)); err != nil {
|
||||||
return errors.Wrap(err, "string")
|
return errors.Wrap(err, "string")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -1038,7 +1038,7 @@ func decodeActionSubmissionRequestChangesParams(args [1]string, argsEscaped bool
|
|||||||
return nil
|
return nil
|
||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return params, &ogenerrors.DecodeParamError{
|
return params, &ogenerrors.DecodeParamError{
|
||||||
Name: "StatusMessage",
|
Name: "ErrorMessage",
|
||||||
In: "query",
|
In: "query",
|
||||||
Err: err,
|
Err: err,
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,12 @@ type AuditEventDataChangeName struct {
|
|||||||
NewName string `json:"new_name"`
|
NewName string `json:"new_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validator had an error
|
||||||
|
const AuditEventTypeError AuditEventType = 6
|
||||||
|
type AuditEventDataError struct {
|
||||||
|
Error string `json:"error"`
|
||||||
|
}
|
||||||
|
|
||||||
type AuditEvent struct {
|
type AuditEvent struct {
|
||||||
ID int64 `gorm:"primaryKey"`
|
ID int64 `gorm:"primaryKey"`
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
|
@ -39,5 +39,4 @@ type Mapfix struct {
|
|||||||
Completed bool // Has this version of the map been completed at least once on maptest
|
Completed bool // Has this version of the map been completed at least once on maptest
|
||||||
TargetAssetID uint64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
|
TargetAssetID uint64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
|
||||||
StatusID MapfixStatus
|
StatusID MapfixStatus
|
||||||
StatusMessage string
|
|
||||||
}
|
}
|
||||||
|
@ -40,5 +40,4 @@ type Submission struct {
|
|||||||
Completed bool // Has this version of the map been completed at least once on maptest
|
Completed bool // Has this version of the map been completed at least once on maptest
|
||||||
UploadedAssetID uint64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
|
UploadedAssetID uint64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
|
||||||
StatusID SubmissionStatus
|
StatusID SubmissionStatus
|
||||||
StatusMessage string
|
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,6 @@ func (svc *Service) GetMapfix(ctx context.Context, params api.GetMapfixParams) (
|
|||||||
Completed: mapfix.Completed,
|
Completed: mapfix.Completed,
|
||||||
TargetAssetID: int64(mapfix.TargetAssetID),
|
TargetAssetID: int64(mapfix.TargetAssetID),
|
||||||
StatusID: int32(mapfix.StatusID),
|
StatusID: int32(mapfix.StatusID),
|
||||||
StatusMessage: mapfix.StatusMessage,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +572,6 @@ func (svc *Service) ActionMapfixResetSubmitting(ctx context.Context, params api.
|
|||||||
target_status := model.MapfixStatusUnderConstruction
|
target_status := model.MapfixStatusUnderConstruction
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", "Manually forced reset")
|
|
||||||
err = svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusSubmitting}, smap)
|
err = svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusSubmitting}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -975,7 +973,6 @@ func (svc *Service) ActionMapfixAccepted(ctx context.Context, params api.ActionM
|
|||||||
target_status := model.MapfixStatusAcceptedUnvalidated
|
target_status := model.MapfixStatusAcceptedUnvalidated
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", "Manually forced reset")
|
|
||||||
err = svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusValidating}, smap)
|
err = svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusValidating}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -143,7 +143,6 @@ func (svc *Service) GetSubmission(ctx context.Context, params api.GetSubmissionP
|
|||||||
Completed: submission.Completed,
|
Completed: submission.Completed,
|
||||||
UploadedAssetID: api.NewOptInt64(int64(submission.UploadedAssetID)),
|
UploadedAssetID: api.NewOptInt64(int64(submission.UploadedAssetID)),
|
||||||
StatusID: int32(submission.StatusID),
|
StatusID: int32(submission.StatusID),
|
||||||
StatusMessage: submission.StatusMessage,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,7 +593,6 @@ func (svc *Service) ActionSubmissionResetSubmitting(ctx context.Context, params
|
|||||||
target_status := model.SubmissionStatusUnderConstruction
|
target_status := model.SubmissionStatusUnderConstruction
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", "Manually forced reset")
|
|
||||||
err = svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusSubmitting}, smap)
|
err = svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusSubmitting}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -986,7 +984,6 @@ func (svc *Service) ActionSubmissionAccepted(ctx context.Context, params api.Act
|
|||||||
target_status := model.SubmissionStatusAcceptedUnvalidated
|
target_status := model.SubmissionStatusAcceptedUnvalidated
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", "Manually forced reset")
|
|
||||||
err = svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusValidating}, smap)
|
err = svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusValidating}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -124,12 +124,34 @@ func (svc *Service) ActionMapfixRequestChanges(ctx context.Context, params inter
|
|||||||
target_status := model.MapfixStatusChangesRequested
|
target_status := model.MapfixStatusChangesRequested
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", params.StatusMessage)
|
|
||||||
err := svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusSubmitting}, smap)
|
err := svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusSubmitting}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
event_data := model.AuditEventDataError{
|
||||||
|
Error: params.ErrorMessage,
|
||||||
|
}
|
||||||
|
|
||||||
|
EventData, err := json.Marshal(event_data)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = svc.DB.AuditEvents().Create(ctx, model.AuditEvent{
|
||||||
|
ID: 0,
|
||||||
|
User: ValidtorUserID,
|
||||||
|
ResourceType: model.ResourceMapfix,
|
||||||
|
ResourceID: params.MapfixID,
|
||||||
|
EventType: model.AuditEventTypeError,
|
||||||
|
EventData: EventData,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
event_data := model.AuditEventDataAction{
|
event_data := model.AuditEventDataAction{
|
||||||
TargetStatus: uint32(target_status),
|
TargetStatus: uint32(target_status),
|
||||||
}
|
}
|
||||||
@ -176,12 +198,36 @@ func (svc *Service) ActionMapfixAccepted(ctx context.Context, params internal.Ac
|
|||||||
target_status := model.MapfixStatusAcceptedUnvalidated
|
target_status := model.MapfixStatusAcceptedUnvalidated
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", params.StatusMessage)
|
|
||||||
err := svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusValidating}, smap)
|
err := svc.DB.Mapfixes().IfStatusThenUpdate(ctx, params.MapfixID, []model.MapfixStatus{model.MapfixStatusValidating}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//push an error audit event
|
||||||
|
{
|
||||||
|
event_data := model.AuditEventDataError{
|
||||||
|
Error: params.ErrorMessage,
|
||||||
|
}
|
||||||
|
|
||||||
|
EventData, err := json.Marshal(event_data)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = svc.DB.AuditEvents().Create(ctx, model.AuditEvent{
|
||||||
|
ID: 0,
|
||||||
|
User: ValidtorUserID,
|
||||||
|
ResourceType: model.ResourceMapfix,
|
||||||
|
ResourceID: params.MapfixID,
|
||||||
|
EventType: model.AuditEventTypeError,
|
||||||
|
EventData: EventData,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// push an action audit event
|
||||||
event_data := model.AuditEventDataAction{
|
event_data := model.AuditEventDataAction{
|
||||||
TargetStatus: uint32(target_status),
|
TargetStatus: uint32(target_status),
|
||||||
}
|
}
|
||||||
|
@ -123,12 +123,36 @@ func (svc *Service) ActionSubmissionRequestChanges(ctx context.Context, params i
|
|||||||
target_status := model.SubmissionStatusChangesRequested
|
target_status := model.SubmissionStatusChangesRequested
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", params.StatusMessage)
|
|
||||||
err := svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusSubmitting}, smap)
|
err := svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusSubmitting}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//push an error audit event
|
||||||
|
{
|
||||||
|
event_data := model.AuditEventDataError{
|
||||||
|
Error: params.ErrorMessage,
|
||||||
|
}
|
||||||
|
|
||||||
|
EventData, err := json.Marshal(event_data)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = svc.DB.AuditEvents().Create(ctx, model.AuditEvent{
|
||||||
|
ID: 0,
|
||||||
|
User: ValidtorUserID,
|
||||||
|
ResourceType: model.ResourceSubmission,
|
||||||
|
ResourceID: params.SubmissionID,
|
||||||
|
EventType: model.AuditEventTypeError,
|
||||||
|
EventData: EventData,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// push an action audit event
|
||||||
event_data := model.AuditEventDataAction{
|
event_data := model.AuditEventDataAction{
|
||||||
TargetStatus: uint32(target_status),
|
TargetStatus: uint32(target_status),
|
||||||
}
|
}
|
||||||
@ -202,12 +226,37 @@ func (svc *Service) ActionSubmissionAccepted(ctx context.Context, params interna
|
|||||||
target_status := model.SubmissionStatusAcceptedUnvalidated
|
target_status := model.SubmissionStatusAcceptedUnvalidated
|
||||||
smap := datastore.Optional()
|
smap := datastore.Optional()
|
||||||
smap.Add("status_id", target_status)
|
smap.Add("status_id", target_status)
|
||||||
smap.Add("status_message", params.StatusMessage)
|
|
||||||
err := svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusValidating}, smap)
|
err := svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.SubmissionStatus{model.SubmissionStatusValidating}, smap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//push an error audit event
|
||||||
|
{
|
||||||
|
event_data := model.AuditEventDataError{
|
||||||
|
Error: params.ErrorMessage,
|
||||||
|
}
|
||||||
|
|
||||||
|
EventData, err := json.Marshal(event_data)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = svc.DB.AuditEvents().Create(ctx, model.AuditEvent{
|
||||||
|
ID: 0,
|
||||||
|
User: ValidtorUserID,
|
||||||
|
ResourceType: model.ResourceSubmission,
|
||||||
|
ResourceID: params.SubmissionID,
|
||||||
|
EventType: model.AuditEventTypeError,
|
||||||
|
EventData: EventData,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// push an action audit event
|
||||||
event_data := model.AuditEventDataAction{
|
event_data := model.AuditEventDataAction{
|
||||||
TargetStatus: uint32(target_status),
|
TargetStatus: uint32(target_status),
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ impl Context{
|
|||||||
}
|
}
|
||||||
// simple submission endpoints
|
// simple submission endpoints
|
||||||
action!("submissions",action_submission_request_changes,config,ActionSubmissionRequestChangesRequest,"status/validator-request-changes",config.SubmissionID,
|
action!("submissions",action_submission_request_changes,config,ActionSubmissionRequestChangesRequest,"status/validator-request-changes",config.SubmissionID,
|
||||||
("StatusMessage",config.StatusMessage.as_str())
|
("ErrorMessage",config.ErrorMessage.as_str())
|
||||||
);
|
);
|
||||||
action!("submissions",action_submission_submitted,config,ActionSubmissionSubmittedRequest,"status/validator-submitted",config.SubmissionID,
|
action!("submissions",action_submission_submitted,config,ActionSubmissionSubmittedRequest,"status/validator-submitted",config.SubmissionID,
|
||||||
("ModelVersion",config.ModelVersion.to_string().as_str())
|
("ModelVersion",config.ModelVersion.to_string().as_str())
|
||||||
@ -177,7 +177,7 @@ impl Context{
|
|||||||
("UploadedAssetID",config.UploadedAssetID.to_string().as_str())
|
("UploadedAssetID",config.UploadedAssetID.to_string().as_str())
|
||||||
);
|
);
|
||||||
action!("submissions",action_submission_accepted,config,ActionSubmissionAcceptedRequest,"status/validator-failed",config.SubmissionID,
|
action!("submissions",action_submission_accepted,config,ActionSubmissionAcceptedRequest,"status/validator-failed",config.SubmissionID,
|
||||||
("StatusMessage",config.StatusMessage.as_str())
|
("ErrorMessage",config.ErrorMessage.as_str())
|
||||||
);
|
);
|
||||||
pub async fn create_mapfix<'a>(&self,config:CreateMapfixRequest<'a>)->Result<MapfixIDResponse,Error>{
|
pub async fn create_mapfix<'a>(&self,config:CreateMapfixRequest<'a>)->Result<MapfixIDResponse,Error>{
|
||||||
let url_raw=format!("{}/mapfixes",self.0.base_url);
|
let url_raw=format!("{}/mapfixes",self.0.base_url);
|
||||||
@ -192,7 +192,7 @@ impl Context{
|
|||||||
}
|
}
|
||||||
// simple mapfixes endpoints
|
// simple mapfixes endpoints
|
||||||
action!("mapfixes",action_mapfix_request_changes,config,ActionMapfixRequestChangesRequest,"status/validator-request-changes",config.MapfixID,
|
action!("mapfixes",action_mapfix_request_changes,config,ActionMapfixRequestChangesRequest,"status/validator-request-changes",config.MapfixID,
|
||||||
("StatusMessage",config.StatusMessage.as_str())
|
("ErrorMessage",config.ErrorMessage.as_str())
|
||||||
);
|
);
|
||||||
action!("mapfixes",action_mapfix_submitted,config,ActionMapfixSubmittedRequest,"status/validator-submitted",config.MapfixID,
|
action!("mapfixes",action_mapfix_submitted,config,ActionMapfixSubmittedRequest,"status/validator-submitted",config.MapfixID,
|
||||||
("ModelVersion",config.ModelVersion.to_string().as_str())
|
("ModelVersion",config.ModelVersion.to_string().as_str())
|
||||||
@ -204,7 +204,7 @@ impl Context{
|
|||||||
);
|
);
|
||||||
action!("mapfixes",action_mapfix_uploaded,config,ActionMapfixUploadedRequest,"status/validator-uploaded",config.MapfixID,);
|
action!("mapfixes",action_mapfix_uploaded,config,ActionMapfixUploadedRequest,"status/validator-uploaded",config.MapfixID,);
|
||||||
action!("mapfixes",action_mapfix_accepted,config,ActionMapfixAcceptedRequest,"status/validator-failed",config.MapfixID,
|
action!("mapfixes",action_mapfix_accepted,config,ActionMapfixAcceptedRequest,"status/validator-failed",config.MapfixID,
|
||||||
("StatusMessage",config.StatusMessage.as_str())
|
("ErrorMessage",config.ErrorMessage.as_str())
|
||||||
);
|
);
|
||||||
// simple operation endpoint
|
// simple operation endpoint
|
||||||
action!("operations",action_operation_failed,config,ActionOperationFailedRequest,"status/operation-failed",config.OperationID,
|
action!("operations",action_operation_failed,config,ActionOperationFailedRequest,"status/operation-failed",config.OperationID,
|
||||||
|
@ -233,7 +233,7 @@ pub struct ActionSubmissionSubmittedRequest{
|
|||||||
#[derive(Clone,Debug)]
|
#[derive(Clone,Debug)]
|
||||||
pub struct ActionSubmissionRequestChangesRequest{
|
pub struct ActionSubmissionRequestChangesRequest{
|
||||||
pub SubmissionID:i64,
|
pub SubmissionID:i64,
|
||||||
pub StatusMessage:String,
|
pub ErrorMessage:String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(nonstandard_style)]
|
#[allow(nonstandard_style)]
|
||||||
@ -247,7 +247,7 @@ pub struct ActionSubmissionUploadedRequest{
|
|||||||
#[derive(Clone,Debug)]
|
#[derive(Clone,Debug)]
|
||||||
pub struct ActionSubmissionAcceptedRequest{
|
pub struct ActionSubmissionAcceptedRequest{
|
||||||
pub SubmissionID:i64,
|
pub SubmissionID:i64,
|
||||||
pub StatusMessage:String,
|
pub ErrorMessage:String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone,Copy,Debug,serde::Deserialize)]
|
#[derive(Clone,Copy,Debug,serde::Deserialize)]
|
||||||
@ -272,7 +272,7 @@ pub struct ActionMapfixSubmittedRequest{
|
|||||||
#[derive(Clone,Debug)]
|
#[derive(Clone,Debug)]
|
||||||
pub struct ActionMapfixRequestChangesRequest{
|
pub struct ActionMapfixRequestChangesRequest{
|
||||||
pub MapfixID:i64,
|
pub MapfixID:i64,
|
||||||
pub StatusMessage:String,
|
pub ErrorMessage:String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(nonstandard_style)]
|
#[allow(nonstandard_style)]
|
||||||
@ -285,7 +285,7 @@ pub struct ActionMapfixUploadedRequest{
|
|||||||
#[derive(Clone,Debug)]
|
#[derive(Clone,Debug)]
|
||||||
pub struct ActionMapfixAcceptedRequest{
|
pub struct ActionMapfixAcceptedRequest{
|
||||||
pub MapfixID:i64,
|
pub MapfixID:i64,
|
||||||
pub StatusMessage:String,
|
pub ErrorMessage:String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone,Copy,Debug,serde::Deserialize)]
|
#[derive(Clone,Copy,Debug,serde::Deserialize)]
|
||||||
|
@ -35,7 +35,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
self.api.action_mapfix_request_changes(
|
self.api.action_mapfix_request_changes(
|
||||||
submissions_api::types::ActionMapfixRequestChangesRequest{
|
submissions_api::types::ActionMapfixRequestChangesRequest{
|
||||||
MapfixID:mapfix_id,
|
MapfixID:mapfix_id,
|
||||||
StatusMessage:report.to_string(),
|
ErrorMessage:report.to_string(),
|
||||||
}
|
}
|
||||||
).await.map_err(Error::ApiActionMapfixCheck)?;
|
).await.map_err(Error::ApiActionMapfixCheck)?;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
self.api.action_mapfix_request_changes(
|
self.api.action_mapfix_request_changes(
|
||||||
submissions_api::types::ActionMapfixRequestChangesRequest{
|
submissions_api::types::ActionMapfixRequestChangesRequest{
|
||||||
MapfixID:mapfix_id,
|
MapfixID:mapfix_id,
|
||||||
StatusMessage:e.to_string(),
|
ErrorMessage:e.to_string(),
|
||||||
}
|
}
|
||||||
).await.map_err(Error::ApiActionMapfixCheck)?;
|
).await.map_err(Error::ApiActionMapfixCheck)?;
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
self.api.action_submission_request_changes(
|
self.api.action_submission_request_changes(
|
||||||
submissions_api::types::ActionSubmissionRequestChangesRequest{
|
submissions_api::types::ActionSubmissionRequestChangesRequest{
|
||||||
SubmissionID:submission_id,
|
SubmissionID:submission_id,
|
||||||
StatusMessage:report.to_string(),
|
ErrorMessage:report.to_string(),
|
||||||
}
|
}
|
||||||
).await.map_err(Error::ApiActionSubmissionCheck)?;
|
).await.map_err(Error::ApiActionSubmissionCheck)?;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
self.api.action_submission_request_changes(
|
self.api.action_submission_request_changes(
|
||||||
submissions_api::types::ActionSubmissionRequestChangesRequest{
|
submissions_api::types::ActionSubmissionRequestChangesRequest{
|
||||||
SubmissionID:submission_id,
|
SubmissionID:submission_id,
|
||||||
StatusMessage:e.to_string(),
|
ErrorMessage:e.to_string(),
|
||||||
}
|
}
|
||||||
).await.map_err(Error::ApiActionSubmissionCheck)?;
|
).await.map_err(Error::ApiActionSubmissionCheck)?;
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
if let Err(e)=create_result{
|
if let Err(e)=create_result{
|
||||||
self.api.action_operation_failed(submissions_api::types::ActionOperationFailedRequest{
|
self.api.action_operation_failed(submissions_api::types::ActionOperationFailedRequest{
|
||||||
OperationID:operation_id,
|
OperationID:operation_id,
|
||||||
StatusMessage:format!("{e}"),
|
StatusMessage:e.to_string(),
|
||||||
}).await?;
|
}).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
if let Err(e)=create_result{
|
if let Err(e)=create_result{
|
||||||
self.api.action_operation_failed(submissions_api::types::ActionOperationFailedRequest{
|
self.api.action_operation_failed(submissions_api::types::ActionOperationFailedRequest{
|
||||||
OperationID:operation_id,
|
OperationID:operation_id,
|
||||||
StatusMessage:format!("{e}"),
|
StatusMessage:e.to_string(),
|
||||||
}).await?;
|
}).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
// update the mapfix model status to accepted
|
// update the mapfix model status to accepted
|
||||||
self.api.action_mapfix_accepted(submissions_api::types::ActionMapfixAcceptedRequest{
|
self.api.action_mapfix_accepted(submissions_api::types::ActionMapfixAcceptedRequest{
|
||||||
MapfixID:mapfix_id,
|
MapfixID:mapfix_id,
|
||||||
StatusMessage:format!("{e}"),
|
ErrorMessage:e.to_string(),
|
||||||
}).await.map_err(Error::ApiActionMapfixValidate)?;
|
}).await.map_err(Error::ApiActionMapfixValidate)?;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ impl crate::message_handler::MessageHandler{
|
|||||||
// update the submission model status to accepted
|
// update the submission model status to accepted
|
||||||
self.api.action_submission_accepted(submissions_api::types::ActionSubmissionAcceptedRequest{
|
self.api.action_submission_accepted(submissions_api::types::ActionSubmissionAcceptedRequest{
|
||||||
SubmissionID:submission_id,
|
SubmissionID:submission_id,
|
||||||
StatusMessage:format!("{e}"),
|
ErrorMessage:e.to_string(),
|
||||||
}).await.map_err(Error::ApiActionSubmissionValidate)?;
|
}).await.map_err(Error::ApiActionSubmissionValidate)?;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ interface CreatorAndReviewStatus {
|
|||||||
asset_id: MapfixInfo["AssetID"],
|
asset_id: MapfixInfo["AssetID"],
|
||||||
creator: MapfixInfo["DisplayName"],
|
creator: MapfixInfo["DisplayName"],
|
||||||
review: MapfixInfo["StatusID"],
|
review: MapfixInfo["StatusID"],
|
||||||
status_message: MapfixInfo["StatusMessage"],
|
|
||||||
submitter: MapfixInfo["Submitter"],
|
submitter: MapfixInfo["Submitter"],
|
||||||
target_asset_id: MapfixInfo["TargetAssetID"],
|
target_asset_id: MapfixInfo["TargetAssetID"],
|
||||||
comments: Comment[],
|
comments: Comment[],
|
||||||
|
@ -54,7 +54,6 @@ function TitleAndComments(stats: CreatorAndReviewStatus) {
|
|||||||
<p className="submitter">Submitter {stats.submitter}</p>
|
<p className="submitter">Submitter {stats.submitter}</p>
|
||||||
<p className="asset-id">Model Asset ID {stats.asset_id}</p>
|
<p className="asset-id">Model Asset ID {stats.asset_id}</p>
|
||||||
<p className="target-asset-id">Target Asset ID {stats.target_asset_id}</p>
|
<p className="target-asset-id">Target Asset ID {stats.target_asset_id}</p>
|
||||||
<p className="status-message">Validation Error: {stats.status_message}</p>
|
|
||||||
<span className="spacer"></span>
|
<span className="spacer"></span>
|
||||||
<Comments comments_data={stats}/>
|
<Comments comments_data={stats}/>
|
||||||
</main>
|
</main>
|
||||||
@ -86,7 +85,7 @@ export default function MapfixInfoPage() {
|
|||||||
<main className="map-page-main">
|
<main className="map-page-main">
|
||||||
<section className="review-section">
|
<section className="review-section">
|
||||||
<RatingArea mapfixId={dynamicId.mapfixId} mapfixStatus={mapfix.StatusID} mapfixSubmitter={mapfix.Submitter} mapfixAssetId={mapfix.AssetID} mapfixTargetAssetId={mapfix.TargetAssetID} />
|
<RatingArea mapfixId={dynamicId.mapfixId} mapfixStatus={mapfix.StatusID} mapfixSubmitter={mapfix.Submitter} mapfixAssetId={mapfix.AssetID} mapfixTargetAssetId={mapfix.TargetAssetID} />
|
||||||
<TitleAndComments name={mapfix.DisplayName} creator={mapfix.Creator} review={mapfix.StatusID} status_message={mapfix.StatusMessage} asset_id={mapfix.AssetID} submitter={mapfix.Submitter} target_asset_id={mapfix.TargetAssetID} comments={[]}/>
|
<TitleAndComments name={mapfix.DisplayName} creator={mapfix.Creator} review={mapfix.StatusID} asset_id={mapfix.AssetID} submitter={mapfix.Submitter} target_asset_id={mapfix.TargetAssetID} comments={[]}/>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</Webpage>
|
</Webpage>
|
||||||
|
@ -12,7 +12,6 @@ interface CreatorAndReviewStatus {
|
|||||||
asset_id: SubmissionInfo["AssetID"],
|
asset_id: SubmissionInfo["AssetID"],
|
||||||
creator: SubmissionInfo["DisplayName"],
|
creator: SubmissionInfo["DisplayName"],
|
||||||
review: SubmissionInfo["StatusID"],
|
review: SubmissionInfo["StatusID"],
|
||||||
status_message: SubmissionInfo["StatusMessage"],
|
|
||||||
submitter: SubmissionInfo["Submitter"],
|
submitter: SubmissionInfo["Submitter"],
|
||||||
uploaded_asset_id: SubmissionInfo["UploadedAssetID"],
|
uploaded_asset_id: SubmissionInfo["UploadedAssetID"],
|
||||||
comments: Comment[],
|
comments: Comment[],
|
||||||
|
@ -46,7 +46,6 @@ function TitleAndComments(stats: CreatorAndReviewStatus) {
|
|||||||
<p className="submitter">Submitter {stats.submitter}</p>
|
<p className="submitter">Submitter {stats.submitter}</p>
|
||||||
<p className="asset-id">Model Asset ID {stats.asset_id}</p>
|
<p className="asset-id">Model Asset ID {stats.asset_id}</p>
|
||||||
<p className="uploaded-asset-id">Uploaded Asset ID {stats.uploaded_asset_id}</p>
|
<p className="uploaded-asset-id">Uploaded Asset ID {stats.uploaded_asset_id}</p>
|
||||||
<p className="status-message">Validation Error: {stats.status_message}</p>
|
|
||||||
<span className="spacer"></span>
|
<span className="spacer"></span>
|
||||||
<Comments comments_data={stats}/>
|
<Comments comments_data={stats}/>
|
||||||
</main>
|
</main>
|
||||||
@ -78,7 +77,7 @@ export default function SubmissionInfoPage() {
|
|||||||
<main className="map-page-main">
|
<main className="map-page-main">
|
||||||
<section className="review-section">
|
<section className="review-section">
|
||||||
<RatingArea assetId={submission.AssetID} submissionId={dynamicId.submissionId} submissionStatus={submission.StatusID} submissionSubmitter={submission.Submitter}/>
|
<RatingArea assetId={submission.AssetID} submissionId={dynamicId.submissionId} submissionStatus={submission.StatusID} submissionSubmitter={submission.Submitter}/>
|
||||||
<TitleAndComments name={submission.DisplayName} creator={submission.Creator} review={submission.StatusID} status_message={submission.StatusMessage} asset_id={submission.AssetID} submitter={submission.Submitter} uploaded_asset_id={submission.UploadedAssetID} comments={[]}/>
|
<TitleAndComments name={submission.DisplayName} creator={submission.Creator} review={submission.StatusID} asset_id={submission.AssetID} submitter={submission.Submitter} uploaded_asset_id={submission.UploadedAssetID} comments={[]}/>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</Webpage>
|
</Webpage>
|
||||||
|
@ -25,8 +25,7 @@ interface MapfixInfo {
|
|||||||
readonly ValidatedAssetVersion: number,
|
readonly ValidatedAssetVersion: number,
|
||||||
readonly Completed: boolean,
|
readonly Completed: boolean,
|
||||||
readonly TargetAssetID: number,
|
readonly TargetAssetID: number,
|
||||||
readonly StatusID: MapfixStatus
|
readonly StatusID: MapfixStatus,
|
||||||
readonly StatusMessage: string,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MapfixList {
|
interface MapfixList {
|
||||||
|
@ -25,8 +25,7 @@ interface SubmissionInfo {
|
|||||||
readonly ValidatedAssetVersion: number,
|
readonly ValidatedAssetVersion: number,
|
||||||
readonly Completed: boolean,
|
readonly Completed: boolean,
|
||||||
readonly UploadedAssetID: number,
|
readonly UploadedAssetID: number,
|
||||||
readonly StatusID: SubmissionStatus
|
readonly StatusID: SubmissionStatus,
|
||||||
readonly StatusMessage: string,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SubmissionList {
|
interface SubmissionList {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user