web_api: combobulate
This commit is contained in:
@@ -119,6 +119,28 @@ func (svc *Service) SeedCombobulator(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Combobulate implements combobulate operation.
|
||||
//
|
||||
// Queue a map for combobulator processing.
|
||||
//
|
||||
// POST /maps-admin/combobulate
|
||||
func (svc *Service) Combobulate(ctx context.Context, params api.CombobulateParams) error {
|
||||
userInfo, ok := ctx.Value("UserInfo").(UserInfoHandle)
|
||||
if !ok {
|
||||
return ErrUserInfo
|
||||
}
|
||||
|
||||
has_role, err := userInfo.HasRoleSubmissionRelease()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !has_role {
|
||||
return ErrPermissionDeniedNeedRoleSubmissionRelease
|
||||
}
|
||||
|
||||
return svc.inner.NatsSeedCombobulator(uint64(params.MapID));
|
||||
}
|
||||
|
||||
// DownloadMapAsset invokes downloadMapAsset operation.
|
||||
//
|
||||
// Download the map asset.
|
||||
|
||||
Reference in New Issue
Block a user