Skip to content

Commit

Permalink
use primaryKey.tsType. (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Oct 11, 2024
1 parent d06def3 commit 53e479d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .blueprint/generate-sample/templates/samples/flickr2.jdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ entity Album {
}

entity Photo {
id UUID
title String required
description TextBlob
image ImageBlob required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class <%= entityAngularName %>Service {
return this.http.put(`${this.resourceUrl}/${<%= entityInstance %>.id}`, <%= entityInstance %>, { observe: 'response'});
}
find(id: <% if (primaryKey.type === 'String') { %>string<% } else { %>number<% } %>): Observable<HttpResponse<<%= entityAngularName %>>> {
find(id: <%- primaryKey.tsType %>): Observable<HttpResponse<<%= entityAngularName %>>> {
return this.http.get(`${this.resourceUrl}/${id}`, { observe: 'response'});
}
Expand All @@ -58,7 +58,7 @@ export class <%= entityAngularName %>Service {
return this.http.get<<%= entityAngularName %>[]>(this.resourceUrl, { params: options, observe: 'response' });
}
delete(id: <% if (primaryKey.type === 'String') { %>string<% } else { %>number<% } %>): Observable<HttpResponse<any>> {
delete(id: <%- primaryKey.tsType %>): Observable<HttpResponse<any>> {
return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response'});
}
}

0 comments on commit 53e479d

Please sign in to comment.