Exemplo n.º 1
0
        public ActionResult InsertSignature(string mainToken, SignatureDto dto)
        {
            var main   = _characterService.GetMainCharacterByToken(mainToken);
            var maskId = main.MaskType == MaskType.Alliance && main.Pilot.Corporation.AllianceId != null ? main.Pilot.Corporation.Alliance.MaskId : main.Pilot.Corporation.MaskId;
            var newSig = new Signature
            {
                SignatureId   = dto.SignatureId.ToUpper(),
                ExpiryDate    = dto.ExpiryDate,
                Name          = dto.Name,
                SignatureType = dto.SignatureType,
                MaskId        = maskId,
                SystemId      = dto.SystemId
            };

            _signatureService.Insert(newSig, commit: true);
            _signatureService.WormholeSigUpdate(dto, newSig, maskId);
            return(Ok());
        }