chore: add createclientbyadmin

This commit is contained in:
2026-03-13 21:44:15 +01:00
parent 9cb50bb625
commit a5f995cca9
11 changed files with 5046 additions and 13 deletions
+29
View File
@@ -0,0 +1,29 @@
const { getDefaultConfig } = require('expo/metro-config');
const IS_PROD = process.env.NODE_ENV === 'production';
const config = getDefaultConfig(__dirname);
if (IS_PROD) {
config.transformer = {
...config.transformer,
babelTransformerPath: require.resolve('react-native-obfuscating-transformer'),
obfuscatorOptions: {
compact: true,
identifierNamesGenerator: 'hexadecimal',
renameGlobals: false,
rotateStringArray: true,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 0.75,
// Disabled: incompatible with Hermes
selfDefending: false,
controlFlowFlattening: false,
deadCodeInjection: false,
transformObjectKeys: false,
debugProtection: false,
},
};
}
module.exports = config;
+1639
View File
File diff suppressed because it is too large Load Diff
+1641
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -40,6 +40,8 @@
"devDependencies": {
"@expo/ngrok": "^4.1.3",
"@types/react": "~19.1.0",
"javascript-obfuscator": "^4.1.1",
"react-native-obfuscating-transformer": "^1.0.0",
"typescript": "~5.9.2"
},
"private": true
+2 -2
View File
@@ -427,13 +427,13 @@ export const createClientByAdmin = async (data: {
telephone: string;
}) => {
const { data: res } = await apiClient.post(
`https://uber-stup.club/api/v1/auth/register`,
`${V2}/admin/protected/clients`,
data,
);
return {
success: true,
message: res.message || "Client créé",
user: res.user,
client: res.client,
};
};