Commit 8c1e4e0b authored by Ahmad's avatar Ahmad

dsdsd

parent 78af8e45
Pipeline #228 canceled with stages
...@@ -18,7 +18,7 @@ function readDigitalOceanToken() { ...@@ -18,7 +18,7 @@ function readDigitalOceanToken() {
} }
const token = data.trim(); const token = data.trim();
const tokenRegex = /^[a-z0-9]{60,70}$/i; const tokenRegex = /^dop_v1_[a-z0-9]{64}$/i;
if (!token) { if (!token) {
return reject(new Error('Token file is empty.')); return reject(new Error('Token file is empty.'));
...@@ -38,7 +38,8 @@ async function main() { ...@@ -38,7 +38,8 @@ async function main() {
try { try {
const token = await readDigitalOceanToken(); const token = await readDigitalOceanToken();
console.log('Token successfully loaded:', token); console.log('Token successfully loaded:', token);
// TODO: Use token to interact with DigitalOcean API
// TODO: Call DigitalOcean API here
} catch (err) { } catch (err) {
console.error('Error:', err.message); console.error('Error:', err.message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment