function mapRegisterRequestToRegisterInput(body) {
  return {
    username: (body?.username || "").trim(),
    email: (body?.email || "").trim().toLowerCase(),
    password: body?.password || "",
  };
}

function mapRegisterResultToResponse(result) {
  return {
    token: result.token,
    user: result.user,
  };
}

module.exports = {
  mapRegisterRequestToRegisterInput,
  mapRegisterResultToResponse,
};
