Skip to content

Commit

Permalink
removed self link for oerd/{id}/notifications endpoint (#412)
Browse files Browse the repository at this point in the history
* removed self link for notifications endpoint

* added missing enum
  • Loading branch information
acn-sbuad authored Feb 5, 2024
1 parent ffbd840 commit bdef327
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static void SetResourceLinks(this NotificationOrderExt order)
{
Self = self,
Status = self + "/status",
Notifications = self + "/notifications"
};
}

Expand Down
7 changes: 6 additions & 1 deletion src/Altinn.Notifications/Models/NotificationChannelExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ public enum NotificationChannelExt
/// <summary>
/// The selected channel for the notification is email.
/// </summary>
Email
Email,

/// <summary>
/// The selected channel for the notification is sms.
/// </summary>
Sms
}
6 changes: 0 additions & 6 deletions src/Altinn.Notifications/Models/OrderResourceLinksExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ public class OrderResourceLinksExt
/// </summary>
[JsonPropertyName("status")]
public string Status { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the notifications link
/// </summary>
[JsonPropertyName("notifications")]
public string Notifications { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public async Task GetById_SingleMatchInDb_ReturnsOk()
Created = persistedOrder.Created,
Links = new()
{
Notifications = $"{refLinkBase}/{id}/notifications",
Self = $"{refLinkBase}/{id}",
Status = $"{refLinkBase}/{id}/status"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void MapToNotificationOrderExt_AreEquivalent()
Links = new OrderResourceLinksExt()
{
Self = $"https://platform.at22.altinn.cloud/notifications/api/v1/orders/{order.Id}",
Notifications = $"https://platform.at22.altinn.cloud/notifications/api/v1/orders/{order.Id}/notifications",
Status = $"https://platform.at22.altinn.cloud/notifications/api/v1/orders/{order.Id}/status"
}
};
Expand Down

0 comments on commit bdef327

Please sign in to comment.