Skip to content

Commit 106f6dc

Browse files
author
Paul Johnson
committed
Rename parameter for clarity
1 parent 4eb7579 commit 106f6dc

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function entityResource($q, $http, umbRequestHelper) {
127127
'Failed to retrieve url for id:' + id);
128128
},
129129

130-
getUrlsByUdis: function(ids, culture) {
130+
getUrlsByUdis: function(udis, culture) {
131131
var query = "culture=" + (culture || "");
132132

133133
return umbRequestHelper.resourcePromise(
@@ -137,9 +137,9 @@ function entityResource($q, $http, umbRequestHelper) {
137137
"GetUrlsByUdis",
138138
query),
139139
{
140-
ids: ids
140+
udis: udis
141141
}),
142-
'Failed to retrieve url map for ids ' + ids);
142+
'Failed to retrieve url map for udis ' + udis);
143143
},
144144

145145
getUrlByUdi: function (udi, culture) {

src/Umbraco.Web/Editors/EntityController.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public HttpResponseMessage GetUrl(Udi udi, string culture = "*")
238238
/// <summary>
239239
/// Get entity URLs by UDIs
240240
/// </summary>
241-
/// <param name="ids">
241+
/// <param name="udis">
242242
/// A list of UDIs to lookup items by
243243
/// </param>
244244
/// <param name="culture">The culture to fetch the URL for</param>
@@ -248,14 +248,9 @@ public HttpResponseMessage GetUrl(Udi udi, string culture = "*")
248248
/// </remarks>
249249
[HttpGet]
250250
[HttpPost]
251-
public IDictionary<Udi, string> GetUrlsByUdis([FromJsonPath] Udi[] ids, string culture = null)
251+
public IDictionary<Udi, string> GetUrlsByUdis([FromJsonPath] Udi[] udis, string culture = null)
252252
{
253-
if (ids == null)
254-
{
255-
throw new HttpResponseException(HttpStatusCode.NotFound);
256-
}
257-
258-
if (ids.Length == 0)
253+
if (udis == null || udis.Length == 0)
259254
{
260255
return new Dictionary<Udi, string>();
261256
}
@@ -277,7 +272,7 @@ string MediaOrDocumentUrl(Udi udi)
277272
};
278273
}
279274

280-
return ids
275+
return udis
281276
.Select(udi => new {
282277
Udi = udi,
283278
Url = MediaOrDocumentUrl(udi)

0 commit comments

Comments
 (0)