submissions: add initial fields
This commit is contained in:
parent
d34a5c7091
commit
1b4456f30a
pkg
@ -12,6 +12,8 @@ type CreateSubmissionRequest struct {
|
|||||||
DisplayName string
|
DisplayName string
|
||||||
Creator string
|
Creator string
|
||||||
GameID uint32
|
GameID uint32
|
||||||
|
Status uint32
|
||||||
|
Roles uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateMapfixRequest struct {
|
type CreateMapfixRequest struct {
|
||||||
|
@ -106,6 +106,8 @@ func (svc *Service) CreateSubmission(ctx context.Context, request *api.Submissio
|
|||||||
DisplayName: request.DisplayName,
|
DisplayName: request.DisplayName,
|
||||||
Creator: request.Creator,
|
Creator: request.Creator,
|
||||||
GameID: uint32(request.GameID),
|
GameID: uint32(request.GameID),
|
||||||
|
Status: uint32(model.SubmissionStatusUnderConstruction),
|
||||||
|
Roles: uint32(RolesEmpty),
|
||||||
}
|
}
|
||||||
|
|
||||||
j, err := json.Marshal(create_request)
|
j, err := json.Marshal(create_request)
|
||||||
|
@ -337,6 +337,7 @@ func (svc *Service) CreateSubmission(ctx context.Context, request *internal.Subm
|
|||||||
var Submitter=uint64(request.AssetOwner);
|
var Submitter=uint64(request.AssetOwner);
|
||||||
var AssetID=uint64(request.AssetID);
|
var AssetID=uint64(request.AssetID);
|
||||||
var AssetVersion=uint64(request.AssetVersion);
|
var AssetVersion=uint64(request.AssetVersion);
|
||||||
|
var Status=model.SubmissionStatus(request.Status);
|
||||||
|
|
||||||
// Check if an active submission with the same asset id exists
|
// Check if an active submission with the same asset id exists
|
||||||
{
|
{
|
||||||
@ -376,7 +377,7 @@ func (svc *Service) CreateSubmission(ctx context.Context, request *internal.Subm
|
|||||||
AssetID: AssetID,
|
AssetID: AssetID,
|
||||||
AssetVersion: AssetVersion,
|
AssetVersion: AssetVersion,
|
||||||
Completed: false,
|
Completed: false,
|
||||||
StatusID: model.SubmissionStatusUnderConstruction,
|
StatusID: Status,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user