Skip to content

Commit

Permalink
Fix: save user will reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Apr 21, 2024
1 parent 0695fb5 commit a95e3ac
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 33 deletions.
16 changes: 12 additions & 4 deletions src/Frontend/buildExt.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import * as fs from 'fs';
// remove the base URL from the login.js file
const filePath = '../MiniAuth/wwwroot/login.js';
const fileData = fs.readFileSync(filePath, 'utf8');
const updatedData = fileData.replace('http://localhost:5566/MiniAuth/', '');
fs.writeFileSync(filePath, updatedData, 'utf8');
{
const filePath = '../MiniAuth/wwwroot/login.js';
const fileData = fs.readFileSync(filePath, 'utf8');
const updatedData = fileData.replace('http://localhost:5566/MiniAuth/', '');
fs.writeFileSync(filePath, updatedData, 'utf8');
}
{
const filePath = '../MiniAuth.IdentityAuth/wwwroot/login.js';
const fileData = fs.readFileSync(filePath, 'utf8');
const updatedData = fileData.replace('http://localhost:5566/MiniAuth/', '');
fs.writeFileSync(filePath, updatedData, 'utf8');
}
8 changes: 4 additions & 4 deletions src/Frontend/src/views/UsersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ const save = async (data) => {
}
await service.post('api/saveUser', data).then(async () => {
alert(t("updated_successfully"))
await service.post('api/resetPassword', data).then(async (res) => {
alert(t("new_password", [res.newPassword]))
navigator.clipboard.writeText(res.newPassword)
})
if (data.Id == null || data.Id == undefined) {
await resetPassword(data);
}
await fetchData();
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/Frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
base: '/miniauth/',
build: {
emptyOutDir: true,
outDir: '../MiniAuth/wwwroot/',
outDir: '../MiniAuth.IdentityAuth/wwwroot/',
},
plugins: [
vue(),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a95e3ac

Please sign in to comment.