chore: add createclientbyadmin
This commit is contained in:
@@ -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
File diff suppressed because it is too large
Load Diff
Generated
+1641
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user