Files
Compass/backend/api/src/unhide-profile.ts
Martin Braquet ba9b3cfb06 Add pretty formatting (#29)
* Test

* Add pretty formatting

* Fix Tests

* Fix Tests

* Fix Tests

* Fix

* Add pretty formatting fix

* Fix

* Test

* Fix tests

* Clean typeckech

* Add prettier check

* Fix api tsconfig

* Fix api tsconfig

* Fix tsconfig

* Fix

* Fix

* Prettier
2026-02-20 17:32:27 +01:00

20 lines
571 B
TypeScript

import {createSupabaseDirectClient} from 'shared/supabase/init'
import {APIHandler} from './helpers/endpoint'
// Unhide a profile for the requesting user by deleting from hidden_profiles.
// Idempotent: if the pair does not exist, succeed silently.
export const unhideProfile: APIHandler<'unhide-profile'> = async ({hiddenUserId}, auth) => {
const pg = createSupabaseDirectClient()
await pg.none(
`delete
from hidden_profiles
where hider_user_id = $1
and hidden_user_id = $2`,
[auth.uid, hiddenUserId],
)
return {status: 'success'}
}