Skip to content

Commit

Permalink
fix interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ntotten committed Apr 25, 2023
1 parent 8596998 commit ac289e1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Zuplo Todo Sample

This is a simple [Zuplo](https://zuplo.com) sample Todo list API.
2 changes: 1 addition & 1 deletion modules/remove-user-id.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
import { Todo } from "./modules/types"
import { Todo } from "./types"
/**
* This is a simple outbound policy that will remove the 'userId'
* property from the todoItem as it passes out through the gateway
Expand Down
2 changes: 1 addition & 1 deletion modules/todos-and-users.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
import { Todo, User } from "./modules/types"
import { Todo, User } from "./types"

/**
* This is a custom Request Handler that calls two endpoints and merges
Expand Down
6 changes: 3 additions & 3 deletions modules/types.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// The Todo object
interface Todo {
export interface Todo {
id: number,
userId: number,
userId?: number,
title: string,
completed: boolean,
}

// The User object
interface User {
export interface User {
id: number,
name: string,
username: string,
Expand Down

0 comments on commit ac289e1

Please sign in to comment.