public JsonResult ChamadaTrade(String valor)
 {
     if (valor != null)
     {
         var saida = APICalling.Call();
         return(Json(saida));
     }
     else
     {
         var saida = "falha";
         return(Json(saida));
     }
 }
Example #2
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Email,PhoneNumber,City,State,BookMarkedJobListing,Pending_applications,JobCastId,IdentityUserId,IdentityUser")] Developer developer)
        {
            APICalling newCall = new APICalling(); // Created new class APICalling to handle all the calling instead of it being called on the developer controller --- N.E.T. --

            try
            {
                var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
                developer.IdentityUserId = userId;
                _context.Add(developer);

                await _context.SaveChangesAsync();

                newCall.getJobSearchUrl(developer, _context);      // calling api build functions --- N.E.T. --
                await newCall.APIJobsBuilder(developer, _context); // calling api build functions --- N.E.T. --

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View(developer));
            }
        }