mirror of
https://github.com/Kong/insomnia.git
synced 2026-02-15 08:32:11 -05:00
* sort and remove a few * autofix 1 * remove useless undefined * fix types * number seperators * native coercion * utf8 * explicit number * dom node dataset * explicit unused catch * array find * fix types * prefer negative index * from code point * fix error layout * prefer ternary * explicit length * useless case * named functions * utf8 * import style * default parameters * no instance of * clone * use regex test * single call * prettier * fix types * Revert "use regex test" This reverts commit 8fb9e991fffa9e3a51ff75cdc29dad331ed2fb66.
40 lines
990 B
TypeScript
40 lines
990 B
TypeScript
import type { Application } from 'express';
|
|
|
|
export default function setup(app: Application) {
|
|
app.post('/gitlab-api/api/graphql', (_req, res) => {
|
|
res.status(200).send({
|
|
data: {
|
|
currentUser: {
|
|
publicEmail: null,
|
|
name: 'Mark Kim',
|
|
avatarUrl: null,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
app.get('/v1/oauth/gitlab/config', (_req, res) => {
|
|
res.status(200).send({
|
|
applicationId: 'gitlab-oauth-client-id',
|
|
redirectUri: 'http://localhost:3000/not-implemented',
|
|
});
|
|
});
|
|
|
|
app.post('/gitlab-api/oauth/token', (_req, res) => {
|
|
res.status(200).send({
|
|
access_token: '123456789',
|
|
created_at: 1_652_246_628,
|
|
expires_in: 6955,
|
|
refresh_token: '1234567891',
|
|
scope: 'api read_user write_repository read_repository email',
|
|
token_type: 'Bearer',
|
|
});
|
|
});
|
|
|
|
app.post('/gitlab-api/oauth/authorize', (_req, res) => {
|
|
res.status(200).send({
|
|
access_token: '123456789',
|
|
});
|
|
});
|
|
}
|