/** * Generated by orval v7.0.1 🍺 * Do not edit manually. * OpenAPI definition * OpenAPI spec version: v0 */ import type { ResultUserProfileVO, UserProfileRequest } from "../models"; import { customAxiosInstance } from "../../util/axios-instance"; export const getUsers = () => { /** * @summary 获取个人资料 */ const profile = () => { return customAxiosInstance({ url: `/user/profile`, method: "GET", }); }; /** * 支持修改昵称、个性签名、头像 * @summary 修改个人资料 */ const updateProfile = (userProfileRequest: UserProfileRequest) => { const formData = new FormData(); if (userProfileRequest.nickname !== undefined) { formData.append("nickname", userProfileRequest.nickname); } if (userProfileRequest.signature !== undefined) { formData.append("signature", userProfileRequest.signature); } if (userProfileRequest.avatar !== undefined) { formData.append("avatar", userProfileRequest.avatar); } return customAxiosInstance({ url: `/user/profile`, method: "PUT", headers: { "Content-Type": "multipart/form-data" }, data: formData, }); }; return { profile, updateProfile }; }; export type ProfileResult = NonNullable< Awaited["profile"]>> >; export type UpdateProfileResult = NonNullable< Awaited["updateProfile"]>> >;