File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
src/routes/dashboard/admin/ysws-review/[id] Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ IDV_DOMAIN=auth.hackclub.com
2727IDV_CLIENT_ID = changeme
2828IDV_CLIENT_SECRET = changeme
2929
30+ # PXL_API_KEY=
31+
3032SENTRY_AUTH_TOKEN = changeme
3133
3234# AIRTABLE_TOKEN=abcxyz # optional
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { calculatePayouts } from '$lib/currency';
1313import { isValidUrl } from '$lib/utils' ;
1414import { sanitizeUrl } from '@braintree/sanitize-url' ;
1515import { T2_PAYOUT_BRICKS } from '$lib/defs' ;
16+ import { PXL_API_KEY } from '$env/static/private' ;
1617
1718export async function load ( { locals, params } ) {
1819 if ( ! locals . user ) {
@@ -339,6 +340,16 @@ export const actions = {
339340 } )
340341 . where ( eq ( user . id , queriedProject . user . id ) ) ;
341342
343+ if ( PXL_API_KEY )
344+ await fetch ( 'https://pxl.hackclub.com/api/pixels/give' , {
345+ method : 'POST' ,
346+ headers : {
347+ Authorization : `Bearer ${ PXL_API_KEY } ` ,
348+ 'Content-Type' : 'application/json'
349+ } ,
350+ body : JSON . stringify ( { slack_id : queriedProject . user . slackId , number_to_add : 200 } )
351+ } ) ;
352+
342353 const feedbackText = feedback ? `\n\nHere's what they said:\n${ feedback } ` : '' ;
343354
344355 await sendSlackDM (
You can’t perform that action at this time.
0 commit comments