You've already forked AstralRinth
forked from didirus/AstralRinth
Migrate to Turborepo (#1251)
This commit is contained in:
16
apps/frontend/src/helpers/teams.js
Normal file
16
apps/frontend/src/helpers/teams.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export const acceptTeamInvite = async (teamId) => {
|
||||
await useBaseFetch(`team/${teamId}/join`, {
|
||||
apiVersion: 3,
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
export const removeSelfFromTeam = async (teamId) => {
|
||||
const auth = await useAuth()
|
||||
await removeTeamMember(teamId, auth.value.user.id)
|
||||
}
|
||||
export const removeTeamMember = async (teamId, userId) => {
|
||||
await useBaseFetch(`team/${teamId}/members/${userId}`, {
|
||||
apiVersion: 3,
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user