Skip to content

Commit

Permalink
update domain
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmJSD committed Sep 19, 2024
1 parent f2f09cb commit 412c70d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
The SDK for Clocktick within various different languages. The following languages are supported:

- [JS/TS SDK](./js)
- [Go SDK](https://pkg.go.dev/go.clocktick.io/sdk)
- [Go SDK](https://pkg.go.dev/go.clocktick.dev/sdk)
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module go.clocktick.io/sdk
module go.clocktick.dev/sdk

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func sendRequest(
return RequestError{Status: resp.StatusCode, Request: req}
}

const jobsEndpoint = "https://clocktick.io/api/v1/jobs"
const jobsEndpoint = "https://clocktick.dev/api/v1/jobs"

// ScheduleJob is used to schedule a job in the server.
func (s *Server) ScheduleJob(
Expand Down
4 changes: 2 additions & 2 deletions js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function deleteJob(apiKey, jobId) {
throw new Error("Invalid job ID.");
}

const url = `https://clocktick.io/api/v1/jobs/${encodeURIComponent(jobId)}`;
const url = `https://clocktick.dev/api/v1/jobs/${encodeURIComponent(jobId)}`;
await errorHandledFetch(url, apiKey, "DELETE");
}

Expand All @@ -113,7 +113,7 @@ function apiHandlerBuilder(apiKey, encryptionKey, jobType, endpoint) {
return async (props, ...args) => {
const key = await encryptionKey;
const obj = props.toObject();
let url = "https://clocktick.io/api/v1/jobs";
let url = "https://clocktick.dev/api/v1/jobs";
if (obj.id !== null && obj.id !== "") {
url += `/${encodeURIComponent(obj.id)}`;
}
Expand Down
10 changes: 5 additions & 5 deletions js/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function patchFetchCalls<T>(

const id = "%%%&@";
const idEnc = encodeURIComponent(id);
const specificJobUrl = `https://clocktick.io/api/v1/jobs/${idEnc}`;
const specificJobUrl = `https://clocktick.dev/api/v1/jobs/${idEnc}`;

describe("deleteJob", () => {
test("errors if no job ID", async () => {
Expand Down Expand Up @@ -100,7 +100,7 @@ describe("deleteJob", () => {

// Check the fetch calls.
expect(fetchCalls).toEqual([
[`https://clocktick.io/api/v1/jobs/id`, {
[`https://clocktick.dev/api/v1/jobs/id`, {
method: "DELETE",
headers: {
Authorization: "Bearer key",
Expand Down Expand Up @@ -132,7 +132,7 @@ describe("deleteJob", () => {
}

expect(fetchCalls).toEqual([
[`https://clocktick.io/api/v1/jobs/id`, {
[`https://clocktick.dev/api/v1/jobs/id`, {
method: "DELETE",
headers: {
Authorization: "Bearer key",
Expand Down Expand Up @@ -226,7 +226,7 @@ describe("createRouter", () => {
resp(), () => router.test3(fromWithDefaultId, true, "d"), fetchCalls,
));

const defaultUrl = "https://clocktick.io/api/v1/jobs";
const defaultUrl = "https://clocktick.dev/api/v1/jobs";
expect(fetchCalls).toEqual([
fetchReq(specificJobUrl, {
start_from: {
Expand Down Expand Up @@ -313,7 +313,7 @@ describe("createRouter", () => {
resp(), () => router.test2.test4(from, "a"), fetchCalls,
));

const defaultUrl = "https://clocktick.io/api/v1/jobs";
const defaultUrl = "https://clocktick.dev/api/v1/jobs";
expect(fetchCalls).toEqual([
fetchReq(defaultUrl, {
start_from: {
Expand Down

0 comments on commit 412c70d

Please # to comment.