fix: Return own and other sources better
This commit is contained in:
parent
7953c1df30
commit
bb0c93dc2f
@ -46,15 +46,12 @@
|
|||||||
(source.type === 'github' && source.githubAppId && source.githubApp.installationId) ||
|
(source.type === 'github' && source.githubAppId && source.githubApp.installationId) ||
|
||||||
(source.type === 'gitlab' && source.gitlabAppId)
|
(source.type === 'gitlab' && source.gitlabAppId)
|
||||||
);
|
);
|
||||||
|
console.log(filteredSources);
|
||||||
const ownSources = filteredSources.filter((source) => {
|
const ownSources = filteredSources.filter((source) => {
|
||||||
if (source.teams[0].id === $session.teamId) {
|
return source.teams.filter((team) => team.id === $session.teamId);
|
||||||
return source;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
const otherSources = filteredSources.filter((source) => {
|
const otherSources = filteredSources.filter((source) => {
|
||||||
if (source.teams[0].id !== $session.teamId) {
|
return source.teams.filter((team) => team.id !== $session.teamId);
|
||||||
return source;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function handleSubmit(gitSourceId) {
|
async function handleSubmit(gitSourceId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user