1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added request code dialog

This commit is contained in:
Fedor Katurov 2019-11-25 16:08:22 +07:00
parent c0c832d158
commit 6dcb21e9e4
18 changed files with 292 additions and 88 deletions

View file

@ -1,29 +1,30 @@
import { INode } from "~/redux/types";
import { INode } from '~/redux/types';
export const API = {
BASE: process.env.API_HOST,
USER: {
LOGIN: "/user/login",
LOGIN: '/user/login',
VKONTAKTE_LOGIN: `${process.env.API_HOST}/user/vkontakte`,
ME: "/user/",
ME: '/user/',
PROFILE: (username: string) => `/user/${username}/profile`,
MESSAGES: (username: string) => `/user/${username}/messages`,
MESSAGE_SEND: (username: string) => `/user/${username}/messages`,
GET_UPDATES: "/user/updates",
GET_UPDATES: '/user/updates',
REQUEST_CODE: (code?: string) => `/user/restore/${code || ''}`,
UPLOAD: (target, type) => `/upload/${target}/${type}`
UPLOAD: (target, type) => `/upload/${target}/${type}`,
},
NODE: {
SAVE: "/node/",
GET: "/node/",
GET_DIFF: "/node/diff",
SAVE: '/node/',
GET: '/node/',
GET_DIFF: '/node/diff',
GET_NODE: (id: number | string) => `/node/${id}`,
COMMENT: (id: INode["id"]) => `/node/${id}/comment`,
RELATED: (id: INode["id"]) => `/node/${id}/related`,
UPDATE_TAGS: (id: INode["id"]) => `/node/${id}/tags`,
POST_LIKE: (id: INode["id"]) => `/node/${id}/like`,
POST_STAR: (id: INode["id"]) => `/node/${id}/heroic`,
SET_CELL_VIEW: (id: INode["id"]) => `/node/${id}/cell-view`
}
COMMENT: (id: INode['id']) => `/node/${id}/comment`,
RELATED: (id: INode['id']) => `/node/${id}/related`,
UPDATE_TAGS: (id: INode['id']) => `/node/${id}/tags`,
POST_LIKE: (id: INode['id']) => `/node/${id}/like`,
POST_STAR: (id: INode['id']) => `/node/${id}/heroic`,
SET_CELL_VIEW: (id: INode['id']) => `/node/${id}/cell-view`,
},
};