fix codacy suggestions
This commit is contained in:
parent
715033f4e1
commit
6463b3ba37
2 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const createMembership = await prisma.membership.create({
|
await prisma.membership.create({
|
||||||
data: {
|
data: {
|
||||||
teamId: createTeam.id,
|
teamId: createTeam.id,
|
||||||
userId: session.user.id,
|
userId: session.user.id,
|
||||||
|
@ -33,5 +33,5 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
return res.status(201).json({ message: 'Team created' });
|
return res.status(201).json({ message: 'Team created' });
|
||||||
}
|
}
|
||||||
|
|
||||||
res.status(404).json({ message: "Team not found" });
|
res.status(404).json({ message: 'Team not found' });
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import Head from 'next/head';
|
||||||
import Shell from '../../components/Shell';
|
import Shell from '../../components/Shell';
|
||||||
import SettingsShell from '../../components/Settings';
|
import SettingsShell from '../../components/Settings';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useSession } from "next-auth/client";
|
import { useSession } from 'next-auth/client';
|
||||||
import {
|
import {
|
||||||
UsersIcon,
|
UsersIcon,
|
||||||
} from "@heroicons/react/outline";
|
} from "@heroicons/react/outline";
|
||||||
|
@ -104,7 +104,7 @@ export default function Teams() {
|
||||||
{!!invites.length && <div>
|
{!!invites.length && <div>
|
||||||
<h2 className="text-lg leading-6 font-medium text-gray-900">Open Invitations</h2>
|
<h2 className="text-lg leading-6 font-medium text-gray-900">Open Invitations</h2>
|
||||||
<ul className="border px-2 rounded mt-2 mb-2 divide-y divide-gray-200">
|
<ul className="border px-2 rounded mt-2 mb-2 divide-y divide-gray-200">
|
||||||
{invites.map((team) => (
|
{invites.map((team) => <TeamListItem onChange={loadData} key={team.id} team={team}></TeamListItem>)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>}
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue