¿Cómo usar la tarea personalizada de rake ‘undo change timestamp’?

Gracias, lo intentaré más tarde.

Acabo de probar la forma de la API.

Pero obtengo un error 400, que dice:

{ errors: [ 'param is missing or the value is empty: timestamp' ] }

Aquí está mi código:

changeTimestamp(935, 1694291380);

async function changeTimestamp(topicId, timestamp) {
  const endpoint = `/t/${topicId}/change-timestamp`;
  const payload = {
    timestamp: timestamp,
  };
  put(endpoint, payload);
}

async function put(endpoint, payload) {
  const response = await fetch(DISCOURSE_ADDRESS + endpoint, {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
      "Api-Key": DISCOURSE_API_KEY,
      "Api-Username": API_USERNAME,
      body: JSON.stringify(payload),
    },
  });
  const result = await response.json();
  if (!response.ok) {
    console.log("put failed");
    console.log(result);
  } else {
    console.log("put success");
  }
}