Beispiel #1
0
        public async Task <IActionResult> InsertTenantLanguage([FromBody] TenantLanguage tenantLanguage)
        {
            tenantLanguage.TenantId = CurrentUser.TenantId;
            var result = await _tenantLanguageService.Save(tenantLanguage);

            if (result.Code <= 0)
            {
                return(BadRequest(result));
            }
            return(Ok(result));
        }
Beispiel #2
0
        public async Task <IActionResult> AddLanguage(string id, [FromBody] TenantLanguageMeta tenantLanguageMeta)
        {
            var result = await _tenantLanguageService.Save(new TenantLanguage
            {
                TenantId   = id,
                Name       = tenantLanguageMeta.Name,
                IsActive   = tenantLanguageMeta.IsActive,
                IsDefault  = tenantLanguageMeta.IsDefault,
                LanguageId = tenantLanguageMeta.LanguageId
            });

            if (result.Code <= 0)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }