feat: impl dashboard & issue list

This commit is contained in:
2026-05-06 01:42:38 +08:00
parent bef3a0b9ed
commit 7de0039d38
36 changed files with 2381 additions and 107 deletions

View File

@@ -2,10 +2,7 @@ use std::collections::HashMap;
use serde::Deserialize;
use crate::{
api,
query::{self, use_query},
};
use crate::{api, query};
pub(crate) const DEVICE_LOGIN_FLOW_URL: &str = "https://github.com/login/device";
@@ -28,8 +25,8 @@ impl query::QueryFn for CreateDeviceCode {
type Error = api::Error;
type Context = api::QueryContext;
fn key(&self) -> &'static str {
"auth.device_code"
fn key(&self) -> query::Key {
"auth/device_code".into()
}
async fn run(&self, c: &Self::Context) -> Result<Self::Data, Self::Error> {
@@ -64,8 +61,8 @@ impl query::QueryFn for RequestAccessToken {
type Error = api::Error;
type Context = api::QueryContext;
fn key(&self) -> &'static str {
"auth.access_token"
fn key(&self) -> query::Key {
"auth.access_token".into()
}
async fn run(&self, c: &Self::Context) -> Result<Self::Data, Self::Error> {