mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
This time update GT API token properly
This commit is contained in:
@@ -431,7 +431,7 @@ sub translate
|
||||
my ($data, $source, $target, $value) = @_;
|
||||
|
||||
# Updating Google Translate API token to avoid expiration
|
||||
if (((time() - $data->{'start_time'}) * 60) / 15) {
|
||||
if (((time() - $data->{'start_time'}) / 60) > 15) {
|
||||
say CYAN, "Updating Google Translate API token..", RESET;
|
||||
$data->{'token'} = get_google_translate_token();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user