disable auto language detection;
disable languuage switch for now; Tweak some error logs and messages
This commit is contained in:
@ -49,7 +49,19 @@ export const getServerSideProps = async (context) => {
|
||||
}
|
||||
var url = process.env.NEXT_PUBLIC_PUBLIC_URL + "/api/data/publishers/" + context.query.id + "?include=availabilities,assignments,assignments.shift";
|
||||
console.log("GET PUBLISHER FROM:" + url)
|
||||
const { data: item } = await axios.get(url);
|
||||
try {
|
||||
const { data: item } = await axios.get(url);
|
||||
} catch (error) {
|
||||
console.log("error fetching publisher: " + error);
|
||||
//redirect to message page with message "no account found". get user from session
|
||||
const user = context.req.session.user;
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/message?message=Този имейл (' + user.email + ') не е регистриран. Моля свържете се с администратора.',
|
||||
permanent: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// item.allShifts = item.assignments.map((a: Assignment[]) => a.shift);
|
||||
|
||||
|
Reference in New Issue
Block a user