Compare commits
1 Commits
36d486d78c
...
fix/add-me
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bf6b8c6c9 |
@@ -153,6 +153,14 @@ export class OrganizationsService {
|
||||
existing.role = data.role;
|
||||
return this.userOrgRepository.save(existing);
|
||||
}
|
||||
// Update password for existing user being added to a new org
|
||||
if (data.password) {
|
||||
const passwordHash = await bcrypt.hash(data.password, 12);
|
||||
await dataSource.query(
|
||||
`UPDATE shared.users SET password_hash = $1 WHERE id = $2`,
|
||||
[passwordHash, userId],
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Create new user
|
||||
const passwordHash = await bcrypt.hash(data.password, 12);
|
||||
|
||||
@@ -9,20 +9,5 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
<script>
|
||||
(function(d,t) {
|
||||
var BASE_URL="https//chat.hoaledger.com";
|
||||
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=BASE_URL+"/packs/js/sdk.js";
|
||||
g.async = true;
|
||||
s.parentNode.insertBefore(g,s);
|
||||
g.onload=function(){
|
||||
window.chatwootSDK.run({
|
||||
websiteToken: 'K6VXvTtKXvaCMvre4yK85SPb',
|
||||
baseUrl: BASE_URL
|
||||
})
|
||||
}
|
||||
})(document,"script");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user