Web appOpen in Telegram

Threadconst auth = G.headers().bind(headers => {

2 messages · –
H
const auth = G.headers().bind(headers => { // TODO 认证 return G.pure(void 0) }) const get = G.get().semiBind(G.pureText("get")) const post = G.post().semiBind(G.pureText("post")) const del = G.delete().semiBind(G.pureText("delete")) // 所有不需要鉴权的路由 const pubRoute = G.path("/pub").semiBind(G.alts( G.exactPath("/one/:a").bind(params => G.pureJson(params)), G.exactPath("/two/:a").bind(params => G.pureJson(params)), )) // 需要鉴权的路由 const authRoute = auth.semiBind( get.alt(post).alt(del) ) export const api = G.path("/api").semiBind( pubRoute.alt(authRoute) ) 自己设计的,自己用,自己难受。
JJavaScript/Node.js 台灣JavaScript/Node.js 台灣@JavaScriptTw · group · Tech
1 999members4writing in 30 days
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count