Beging to add the authorization with a JWT token

This commit is contained in:
Sébastien André
2020-03-19 21:33:09 +01:00
parent 170ccbd9c5
commit 7bb702e46c
9 changed files with 132 additions and 17 deletions

View File

@@ -17,13 +17,14 @@ namespace skydiveLogs_api.Data
_col = _dataProvider.CollOfJump;
}
public IEnumerable<Jump> GetAll()
public IEnumerable<Jump> GetAll(int userId)
{
return _col.Include(x => x.Aircraft)
.Include(x => x.DropZone)
.Include(x => x.Gear)
.Include(x => x.JumpType)
.FindAll()
.Where(j => j.UserId == userId)
.ToList();
}
@@ -53,6 +54,11 @@ namespace skydiveLogs_api.Data
throw new System.NotImplementedException();
}
public IEnumerable<Jump> GetAll()
{
throw new System.NotImplementedException();
}
private readonly IDataProvider _dataProvider;
private readonly ILiteCollection<Jump> _col;