mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
Auto stash before merge of "dev" and "origin/dev"
This commit is contained in:
parent
4429198397
commit
6ab57a1ace
2 changed files with 11 additions and 1 deletions
|
|
@ -37,6 +37,16 @@ export default async (
|
|||
|
||||
const { teamId, userId } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
if (!(await canUpdateTeam(req.auth, teamId))) {
|
||||
return unauthorized(res, 'You must be the owner of this team.');
|
||||
}
|
||||
|
||||
const teamUser = await getTeamUser(teamId, userId);
|
||||
|
||||
return ok(res, teamUser);
|
||||
}
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (!(await canUpdateTeam(req.auth, teamId))) {
|
||||
return unauthorized(res, 'You must be the owner of this team.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue