mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Renamed id routes for API.
This commit is contained in:
parent
53a991176b
commit
4429198397
42 changed files with 154 additions and 170 deletions
|
|
@ -7,17 +7,17 @@ import { getSharedWebsite } from 'queries';
|
|||
import * as yup from 'yup';
|
||||
|
||||
export interface ShareRequestQuery {
|
||||
id: string;
|
||||
shareId: string;
|
||||
}
|
||||
|
||||
export interface ShareResponse {
|
||||
id: string;
|
||||
shareId: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
id: yup.string().required(),
|
||||
shareId: yup.string().required(),
|
||||
}),
|
||||
};
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export default async (
|
|||
) => {
|
||||
await useValidate(schema, req, res);
|
||||
|
||||
const { id: shareId } = req.query;
|
||||
const { shareId } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
const website = await getSharedWebsite(shareId);
|
||||
Loading…
Add table
Add a link
Reference in a new issue