mirror of
https://github.com/webmin/webmin.git
synced 2026-06-21 03:40:25 +01:00
Fix to update start time
This commit is contained in:
@@ -459,9 +459,11 @@ sub translate
|
||||
my $format = $opt->{'translate-format'};
|
||||
|
||||
# Updating Google Translate API token to avoid expiration
|
||||
if (((time() - $data->{'start_time'}) / 60) > 15) {
|
||||
my $time = time();
|
||||
if ((($time - $data->{'start_time'}) / 60) > 15) {
|
||||
say CYAN, "Updating Google Translate API token..", RESET;
|
||||
$data->{'token'} = get_google_translate_token();
|
||||
$data->{'start_time'} = $time;
|
||||
}
|
||||
|
||||
my $token = $data->{'token'};
|
||||
|
||||
Reference in New Issue
Block a user