Skip to content

Commit

Permalink
fix(core): fixes url for checking studio version (#7060)
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Jul 2, 2024
1 parent a5affb8 commit a44fd5b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const MODULES_URL = `${MODULES_HOST}/${MODULES_URL_VERSION}/modules/`
const fetchLatestVersionForPackage = async (pkg: string, version: string) => {
try {
// On every request it should be a new timestamp, so we can actually get a new version notification
const timestamp = Date.now() / 1000
const res = await fetch(`${MODULES_URL}${pkg}/default/^${version}/t${timestamp}`, {
const timestamp = `t${Math.floor(Date.now() / 1000)}`
const res = await fetch(`${MODULES_URL}${pkg}/default/^${version}/${timestamp}`, {
headers: {
accept: 'application/json',
},
Expand Down

0 comments on commit a44fd5b

Please sign in to comment.