Merge branch 'dev/methapon' into develop

This commit is contained in:
Methapon2001 2024-03-20 17:53:08 +07:00
commit ad3dadd46a

View file

@ -101,10 +101,14 @@ export class ProfileFamilyHistoryController extends Controller {
order: { createdAt: "DESC" },
where: { profileId },
});
return new HttpSuccess({
...family[0],
children,
});
return new HttpSuccess(
family.length > 0
? {
...family[0],
children,
}
: null,
);
}
@Get("history/{profileId}")