use serde::{Deserialize, Serialize};
use crate::{endpoint::Endpoint, resource::question::QuestionResource};
pub struct UpdateQuestion;
impl Endpoint for UpdateQuestion {
const PATH: &'static str = "/repository/{owner}/{repo}/question/{number}";
const METHOD: http::Method = http::Method::PATCH;
type Request = UpdateQuestionRequest;
type Response = UpdateQuestionResponse;
}
#[derive(ApiRequest, Debug, Serialize, Deserialize)]
pub struct UpdateQuestionRequest {
pub title: String,
pub body: String,
}
pub type UpdateQuestionResponse = QuestionResource;