File tree Expand file tree Collapse file tree
lib/credentials/token-service-accounts/validators Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { toArray , toRecord } from '@sim/utils/object'
2- import { secureFetchWithValidation } from '@/lib/core/security/input-validation.server'
2+ import {
3+ type SecureFetchResponse ,
4+ secureFetchWithValidation ,
5+ } from '@/lib/core/security/input-validation.server'
36import {
47 providerFailureCode ,
58 TokenServiceAccountValidationError ,
@@ -32,7 +35,7 @@ export async function validateGitLabServiceAccount(
3235 reason : 'invalid host' ,
3336 } )
3437 }
35- let response : Response
38+ let response : SecureFetchResponse
3639 try {
3740 response = await secureFetchWithValidation (
3841 `https://${ host } /api/v4/personal_access_tokens/self` ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 buildMediaMessageBody ,
1111 buildMediaUploadUrl ,
1212 buildMediaUrl ,
13+ buildMessagesUrl ,
1314 transformWhatsAppSendResponse ,
1415 whatsappMediaLimitFor ,
1516} from '@/tools/whatsapp/utils'
@@ -26,7 +27,7 @@ describe('WhatsApp request URL and headers', () => {
2627 it . each ( [ '../../999/register#' , '..' , '123/subscribed_apps?' ] ) (
2728 'refuses a phone number ID that would leave its path segment (%s)' ,
2829 ( phoneNumberId ) => {
29- expect ( ( ) => sendMessageTool . request . url ( { ... auth , phoneNumberId } ) ) . toThrow ( / p h o n e N u m b e r I d / )
30+ expect ( ( ) => buildMessagesUrl ( phoneNumberId ) ) . toThrow ( / p h o n e N u m b e r I d / )
3031 }
3132 )
3233} )
You can’t perform that action at this time.
0 commit comments