Fix context line handline in project diagnostic view
This commit is contained in:
parent
60f7169008
commit
04d577e326
6 changed files with 75 additions and 24 deletions
|
@ -11,6 +11,7 @@ use oauth2::{
|
|||
TokenResponse as _, TokenUrl,
|
||||
};
|
||||
use rand::thread_rng;
|
||||
use rpc::auth as zed_auth;
|
||||
use scrypt::{
|
||||
password_hash::{PasswordHash, PasswordHasher, PasswordVerifier, SaltString},
|
||||
Scrypt,
|
||||
|
@ -19,7 +20,6 @@ use serde::{Deserialize, Serialize};
|
|||
use std::{borrow::Cow, convert::TryFrom, sync::Arc};
|
||||
use surf::{StatusCode, Url};
|
||||
use tide::{log, Error, Server};
|
||||
use rpc::auth as zed_auth;
|
||||
|
||||
static CURRENT_GITHUB_USER: &'static str = "current_github_user";
|
||||
static GITHUB_AUTH_URL: &'static str = "https://github.com/login/oauth/authorize";
|
||||
|
|
|
@ -2,16 +2,15 @@ use crate::{
|
|||
auth::RequestExt as _, github::Release, AppState, LayoutData, Request, RequestExt as _,
|
||||
};
|
||||
use comrak::ComrakOptions;
|
||||
use serde::{Serialize};
|
||||
use serde::Serialize;
|
||||
use std::sync::Arc;
|
||||
use tide::{http::mime};
|
||||
use tide::http::mime;
|
||||
|
||||
pub fn add_routes(releases: &mut tide::Server<Arc<AppState>>) {
|
||||
releases.at("/releases").get(get_releases);
|
||||
}
|
||||
|
||||
async fn get_releases(mut request: Request) -> tide::Result {
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct ReleasesData {
|
||||
#[serde(flatten)]
|
||||
|
@ -52,4 +51,4 @@ async fn get_releases(mut request: Request) -> tide::Result {
|
|||
.body(request.state().render_template("releases.hbs", &data)?)
|
||||
.content_type(mime::HTML)
|
||||
.build())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue