Skip to content
Snippets Groups Projects

fix(typo): écogestes + optionnel poll

Merged Hugo NOUTS requested to merge dev into master
1 file
+ 49
13
Compare changes
  • Side-by-side
  • Inline
@@ -31,8 +31,14 @@ export class NewsletterService {
}
)
toast.success('Monthly info succesfully saved !')
} catch (e) {
toast.error('Failed to create monthly info')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to create monthly info')
}
console.error(e)
}
}
@@ -56,7 +62,7 @@ export class NewsletterService {
}
)
return data as IMonthlyInfo
} catch (e) {
} catch (e: any) {
console.error('error', e)
return null
}
@@ -81,8 +87,14 @@ export class NewsletterService {
}
)
toast.success('Monthly info succesfully deleted !')
} catch (e) {
toast.error('Failed to delete monthly info')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to delete monthly info')
}
console.error(e)
}
}
@@ -115,8 +127,14 @@ export class NewsletterService {
}
)
toast.success('Monthly news succesfully saved !')
} catch (e) {
toast.error('Failed to create monthly news')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to save monthly news')
}
console.error(e)
}
}
@@ -165,8 +183,14 @@ export class NewsletterService {
}
)
toast.success('Monthly news succesfully deleted !')
} catch (e) {
toast.error('Failed to delete monthly news')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to delete monthly news')
}
console.error(e)
}
}
@@ -199,8 +223,14 @@ export class NewsletterService {
}
)
toast.success('Poll successfully saved !')
} catch (e) {
toast.error('Failed to create poll')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to create poll')
}
console.error(e)
}
}
@@ -246,8 +276,14 @@ export class NewsletterService {
}
)
toast.success('Poll succesfully deleted !')
} catch (e) {
toast.error('Failed to delete poll')
} catch (e: any) {
if (e.response.status === 403) {
toast.error(
"Unauthorized : You don't have the rights to do this operation"
)
} else {
toast.error('Failed to delete poll')
}
console.error(e)
}
}
Loading