-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Source code for Noogler Project - Todo App #14282
base: main
Are you sure you want to change the base?
Conversation
Pull request diff results |
1 similar comment
Pull request diff results |
Let's chat about this tomorrow. |
cebb1c9
to
63704f4
Compare
Pull request diff results |
63704f4
to
28c2619
Compare
Pull request diff results |
28c2619
to
18c505d
Compare
Pull request diff results |
*/ | ||
public abstract class AbstractTodoFunction : IHttpFunction | ||
{ | ||
private static readonly string PROJECT_ID = "yejiyun-testing"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static readonly string PROJECT_ID = "yejiyun-testing"; | |
private const string PROJECT_ID = "yejiyun-testing"; |
public abstract class AbstractTodoFunction : IHttpFunction | ||
{ | ||
private static readonly string PROJECT_ID = "yejiyun-testing"; | ||
private static readonly string DATABASE_ID = "todo-application"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static readonly string DATABASE_ID = "todo-application"; | |
private static readonly string DatabaseId = "todo-application"; |
protected static readonly JsonSerializerOptions SERIALIZER_OPTIONS = new() { | ||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | ||
Converters = { new JsonStringEnumConverter(), new FirestoreTimestampConverter()} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected static readonly JsonSerializerOptions SERIALIZER_OPTIONS = new() { | |
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | |
Converters = { new JsonStringEnumConverter(), new FirestoreTimestampConverter()} | |
}; | |
protected static readonly JsonSerializerOptions SERIALIZER_OPTIONS = new() | |
{ | |
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | |
Converters = { new JsonStringEnumConverter(), new FirestoreTimestampConverter()} | |
}; |
if (!isValid) { | ||
await context.Response.WriteAsync("Request is not valid\n"); | ||
return; | ||
} | ||
|
||
// perform operation | ||
try { | ||
string output = await PerformOperation(todoData); | ||
await context.Response.WriteAsync(output); | ||
} catch (Exception e) { | ||
await context.Response.WriteAsync($"{e.Message}\n"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!isValid) { | |
await context.Response.WriteAsync("Request is not valid\n"); | |
return; | |
} | |
// perform operation | |
try { | |
string output = await PerformOperation(todoData); | |
await context.Response.WriteAsync(output); | |
} catch (Exception e) { | |
await context.Response.WriteAsync($"{e.Message}\n"); | |
} | |
if (!isValid) | |
{ | |
await context.Response.WriteAsync("Request is not valid\n"); | |
return; | |
} | |
// perform operation | |
try | |
{ | |
string output = await PerformOperation(todoData); | |
await context.Response.WriteAsync(output); | |
} | |
catch (Exception e) | |
{ | |
await context.Response.WriteAsync($"{e.Message}\n"); | |
} |
return userId != null | ||
&& title != null | ||
&& description != null | ||
&& userId != "" | ||
&& title != "" | ||
&& description != "" | ||
&& (priority == null || (1 <= priority && priority <= 5)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return userId != null | |
&& title != null | |
&& description != null | |
&& userId != "" | |
&& title != "" | |
&& description != "" | |
&& (priority == null || (1 <= priority && priority <= 5)); | |
return userId is not null | |
&& title is not null | |
&& description != null | |
&& userId != "" | |
&& title != "" | |
&& description != "" | |
&& (priority is null || (1 <= priority && priority <= 5)); |
Charlotte Y's Noogler project
Prompt: Utilizing .Net Cloud SDK, create a basic serverless web API for managing to-do list items using Google Cloud Functions and storing data in Google Cloud Firestore. Manage user registration and authentication with Firebase Auth.
User can: