import request from '@/utils/request';

export function publishDiary(data: any) {
  return request.post('/diaryPost/publish', data);
}

export function getUserDiaries(userId: string, page = 1, size = 10) {
  return request.get('/diaryPost/page', {
    params: { current: page, size, userId }
  });
}