Add LocationId field to UserLocation
This commit is contained in:
parent
486ba1872a
commit
68dbc92172
@ -29,7 +29,7 @@
|
||||
|
||||
public async Task<UserLocation> GetUserLocation(string userId)
|
||||
{
|
||||
return await _locationsRepository.GetUserLocationAsync(id);
|
||||
return await _locationsRepository.GetUserLocationAsync(userId);
|
||||
}
|
||||
|
||||
public async Task<List<Locations>> GetAllLocation()
|
||||
@ -52,7 +52,7 @@
|
||||
var userLocation = await _locationsRepository.GetUserLocationAsync(userId);
|
||||
userLocation = userLocation ?? new UserLocation();
|
||||
userLocation.UserId = userId;
|
||||
userLocation.LocationId = currentUserAreaLocationList[0].Id;
|
||||
userLocation.LocationId = currentUserAreaLocationList[0].LocationId;
|
||||
userLocation.UpdateDate = DateTime.UtcNow;
|
||||
await _locationsRepository.UpdateUserLocationAsync(userLocation);
|
||||
|
||||
|
@ -7,8 +7,10 @@
|
||||
|
||||
public class Locations
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string Id { get; set; }
|
||||
public int LocationId { get; set; }
|
||||
public string Code { get; set; }
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string Parent_Id { get; set; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user