Skip to content

Commit

Permalink
Minor refactoring of getDmsObjectNotes() function in DMS SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
andinaetherk3 committed Oct 12, 2023
1 parent 089029e commit cb7fb3d
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ export interface SingleDmsObjectNote {
* @category DmsObject
*/
export function _getDmsObjectNotesDefaultTransformFunction(response: HttpResponse<any>, context: DvelopContext, params: GetDmsObjectNotesParams) {
let responseNotes = response.data.notes;

if (responseNotes === undefined || responseNotes === null) {
responseNotes = [];
}

const mappedNotes = responseNotes.map((note: SingleDmsObjectNote) => {
const mappedNotes = response.data.notes.map((note: SingleDmsObjectNote) => {
return {
creator: {
id: note.creator.id,
Expand Down Expand Up @@ -103,7 +97,7 @@ export function _getDmsObjectNotesFactory<T>(
* ```typescript
* import { getDmsObjectNotes } from "@dvelop-sdk/dms";
*
* await createDmsObjectNote({
* await getDmsObjectNotes({
* systemBaseUri: "https://steamwheedle-cartel.d-velop.cloud",
* authSessionId: "dQw4w9WgXcQ"
* }, {
Expand Down

0 comments on commit cb7fb3d

Please sign in to comment.