feat: bmi
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
BodyCompositionResponse,
|
||||
GeneratePhysicalFitnessResponse,
|
||||
PhysicalFitnessResponse,
|
||||
} from "./types";
|
||||
@@ -21,3 +22,12 @@ export function generatePhysicalFitness(
|
||||
.post(`v1/physical-fitness/generate/${encodeURIComponent(userID)}`)
|
||||
.json<GeneratePhysicalFitnessResponse>();
|
||||
}
|
||||
|
||||
/** 取得指定使用者的身體組成分析。 */
|
||||
export function fetchBodyComposition(
|
||||
userCode: string,
|
||||
): Promise<BodyCompositionResponse> {
|
||||
return api
|
||||
.get(`v1/physical-fitness/body-composition/${encodeURIComponent(userCode)}`)
|
||||
.json<BodyCompositionResponse>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user