Auto stash before merge of "zmiguel" and "origin/zmiguel"
This commit is contained in:
parent
8ef03a2a00
commit
7fc4063c46
|
@ -0,0 +1,44 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using api.Data;
|
||||||
|
using api.Dtos;
|
||||||
|
using api.Models;
|
||||||
|
using AutoMapper;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace api.Controllers
|
||||||
|
{
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class TeamsController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly DataContext context;
|
||||||
|
private readonly IUsersRepository _repo;
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
private readonly RoleManager<Role> _roleManager;
|
||||||
|
private readonly UserManager<User> _userManager;
|
||||||
|
public TeamsController(DataContext context,IUsersRepository repo, IMapper mapper,RoleManager<Role> roleManager,UserManager<User> UserManager)
|
||||||
|
{
|
||||||
|
this.context = context;
|
||||||
|
_mapper = mapper;
|
||||||
|
_roleManager = roleManager;
|
||||||
|
_userManager = UserManager;
|
||||||
|
_repo = repo;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET api/teams
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> GetTeams()
|
||||||
|
{
|
||||||
|
var values= await context.Values.ToListAsync();
|
||||||
|
return Ok(values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue