File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { Middleware } from '@nuxt/types'
2
2
import { withSSRContext } from 'aws-amplify'
3
3
4
- const authenticated : Middleware = async ( { redirect } ) => {
4
+ const authenticated : Middleware = async ( { redirect, localePath } ) => {
5
5
const { Auth } = withSSRContext ( )
6
6
const userInfo = await Auth . currentUserInfo ( )
7
7
8
8
if ( ! userInfo ) {
9
- redirect ( '/user/login' )
9
+ redirect ( localePath ( '/user/login' ) )
10
10
}
11
11
}
12
12
Original file line number Diff line number Diff line change 1
1
import { Middleware } from '@nuxt/types'
2
2
import { vxm } from '@/store'
3
3
4
- const checkClassData : Middleware = ( { redirect } ) => {
4
+ const checkClassData : Middleware = ( { redirect, localePath } ) => {
5
5
if ( ! vxm . classData . isLoaded ) {
6
- return redirect ( '/' )
6
+ return redirect ( localePath ( '/' ) )
7
7
}
8
8
}
9
9
Original file line number Diff line number Diff line change @@ -113,12 +113,12 @@ export default Vue.extend({
113
113
const reg = / [ -~ ] {6,} $ /
114
114
const response = reg .test (this .password )
115
115
if (! response ) {
116
- return ' パスワードが条件を満たしていません '
116
+ return this . $tc ( ' common.user_data.labels.password_not_acceptable ' )
117
117
}
118
118
}
119
119
if (this .password && this .confirmation ) {
120
120
if (this .password !== this .confirmation ) {
121
- return ' パスワードが一致していません '
121
+ return this . $tc ( ' common.user_data.labels.password_not_same ' )
122
122
}
123
123
return ' '
124
124
}
You can’t perform that action at this time.
0 commit comments