Skip to content

Commit bd7f23a

Browse files
committed
Fixed a bug in QuestAPI when creating quests the QuestType was not being persisted correctly.
- Also fixed various display issues for listing quests in the STAR CLI. - Fixed a bug where a message was shown twice when a username already exists in STAR CLI.
1 parent c25f4db commit bd7f23a

8 files changed

Lines changed: 42 additions & 40 deletions

File tree

OASIS Omniverse/ODOOM/build/oasisstar.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"mint_monster_oquake_scrag": 1,
5555
"mint_monster_oquake_shub": 1,
5656
"beamedin_avatar": "dellams",
57-
"jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE3NTViOWFhLWZiYmQtNDA3OS04OTM0LWRkNWVkYmU5MjYyNCIsIm5iZiI6MTc3NTE3NTI1NSwiZXhwIjoxNzc1MTc2MTU1LCJpYXQiOjE3NzUxNzUyNTV9.7W0X2KckPlXpKwh3O1APTtyN21bIJC-y-qE823LxuNI",
58-
"refresh_token": "72791DBB1F3412E23344F3776492AEA3353596CD0D4175FEA12D59638DB7A07846C30C9F0561A84A"
57+
"jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImY5Y2NmNWIyLTM5OTEtNDJlYy04MTU1LTY1Yjk0YjJlMGYwYyIsIm5iZiI6MTc3NTI5MzI2MywiZXhwIjoxNzc1Mjk0MTYzLCJpYXQiOjE3NzUyOTMyNjN9.KoXFG0yCMRtze3LzUYLBrVqcV_CMqR2GT9a7JYYt6EQ",
58+
"refresh_token": "D4B09798CC405D7529279A65290985DE06EC4C1DE9685C31EA9A27D2A6309FC1F9AB97406BADA434"
5959

6060
}

OASIS Omniverse/STARAPIClient/TestProjects/StarApiTestDefaults.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ public static class StarApiTestDefaults
55
{
66
public const string Username = "dellams";
77
public const string Password = "test!";
8-
public const string Web5BaseUrl = "http://localhost:8888";
8+
public const string Web5BaseUrl = "https://localhost:8888";
99
public const string Web4BaseUrl = "http://localhost:7777";
1010
}

STAR ODK/NextGenSoftware.OASIS.STAR.CLI.Lib/Avatars.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ public string GetValidUsername(string message, bool checkIfUsernameAlreadyInUse
135135
//}
136136

137137
//No need to show error message because the CheckIfUsernameIsAlreadyInUse function already shows this! ;-)
138-
if (checkIfUsernameAlreadyInUseResult.Result)
139-
CLIEngine.ShowErrorMessage(checkIfUsernameAlreadyInUseResult.Message);
140-
else
138+
if (!checkIfUsernameAlreadyInUseResult.Result)
139+
// CLIEngine.ShowErrorMessage(checkIfUsernameAlreadyInUseResult.Message);
140+
//else
141141
{
142142
usernameValid = true;
143143
CLIEngine.Spinner.Stop();

STAR ODK/NextGenSoftware.OASIS.STAR.CLI.Lib/Quests.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -790,21 +790,21 @@ public override async Task ListAllCreatedByBeamedInAvatarAsync(bool showAllVersi
790790
}
791791

792792
CLIEngine.ShowMessage($"{list.Count} quest(s) for {STAR.BeamedInAvatar.Username}:", ConsoleColor.Green);
793-
CLIEngine.ShowDivider();
793+
Console.WriteLine("");
794794
foreach (IQuest iq in list)
795795
{
796-
WriteRuntimeQuestToConsole(iq, showDetailedInfo);
796+
WriteRuntimeQuestToConsole(iq, !showDetailedInfo);
797797

798798
// In "list detailed", include full STARNET holon + STARNET DNA info (mirrors the base list/show output).
799799
if (showDetailedInfo && iq != null)
800800
{
801-
Console.WriteLine("");
802-
await ShowAsync(iq, showHeader: false, showFooter: false, showNumbers: false, number: 0, showDetailedInfo: true);
801+
//Console.WriteLine("");
802+
await ShowAsync(iq, showHeader: false, showFooter: true, showNumbers: false, number: 0, showDetailedInfo: true);
803803
Console.WriteLine("");
804804
}
805805
}
806806

807-
CLIEngine.ShowDivider();
807+
//CLIEngine.ShowDivider();
808808
}
809809

810810
private static object BuildQuestListJsonObject(IQuest q, bool showDetailed)
@@ -873,7 +873,7 @@ private static object BuildQuestListJsonObject(IQuest q, bool showDetailed)
873873
return row;
874874
}
875875

876-
private static void WriteRuntimeQuestToConsole(IQuest q, bool showDetailed)
876+
private static void WriteRuntimeQuestToConsole(IQuest q, bool includeExtraPaddingInFooter = true)
877877
{
878878
string typeLabel = GetRuntimeQuestTypeLabel(q);
879879
string parentNote = q.ParentQuestId != Guid.Empty
@@ -916,7 +916,8 @@ private static void WriteRuntimeQuestToConsole(IQuest q, bool showDetailed)
916916
Console.WriteLine("");
917917
}
918918

919-
Console.WriteLine("");
919+
if (includeExtraPaddingInFooter)
920+
Console.WriteLine("");
920921
}
921922

922923
private static string GetRuntimeQuestTypeLabel(IQuest q)

STAR ODK/NextGenSoftware.OASIS.STAR.CLI.Lib/STARNETUIBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ protected void ShowAllDependencies(ISTARNETHolon starHolon, bool showDetailed, i
24362436

24372437
Console.WriteLine("");
24382438
DisplayProperty("DEPENDENCIES (SMART BRICKS)", "", displayFieldLength, false);
2439-
Console.WriteLine("");
2439+
// Console.WriteLine("");
24402440
DisplayDependencyType("OAPPs", starHolon.STARNETDNA.Dependencies.OAPPs, tip, showDetailed, displayFieldLength);
24412441
DisplayDependencyType("Runtimes", starHolon.STARNETDNA.Dependencies.Runtimes, tip, showDetailed, displayFieldLength);
24422442
DisplayDependencyType("Libs", starHolon.STARNETDNA.Dependencies.Libraries, tip, showDetailed, displayFieldLength);

STAR ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/QuestsController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ public async Task<IActionResult> CreateQuestWithOptions([FromBody] CreateQuestRe
726726
await EnsureStarApiBootedAsync();
727727
EnsureLoggedInAvatar();
728728

729-
var result = await _starAPI.Quests.CreateAsync(AvatarId, request.Name, request.Description, request.HolonSubType, request.SourceFolderPath, request.CreateOptions);
729+
var result = await _starAPI.Quests.CreateAsync(AvatarId, request.Name, request.Description, request.QuestType, request.SourceFolderPath, request.CreateOptions);
730730

731731
// Return test data if setting is enabled and result is null, has error, or result is null
732732
if (UseTestDataWhenLiveDataNotAvailable && TestDataHelper.ShouldUseTestData(result))
@@ -1954,7 +1954,8 @@ public class CreateQuestRequest
19541954
{
19551955
public string Name { get; set; } = "";
19561956
public string Description { get; set; } = "";
1957-
public HolonType HolonSubType { get; set; } = HolonType.Quest;
1957+
//public HolonType HolonSubType { get; set; } = HolonType.Quest;
1958+
public QuestType QuestType { get; set; } = QuestType.MainQuest;
19581959
public string SourceFolderPath { get; set; } = "";
19591960
public ISTARNETCreateOptions<Quest, STARNETDNA>? CreateOptions { get; set; } = null;
19601961
/// <summary>Optional quest-level GeoHotSpot (e.g. visit or trigger media/text/link).</summary>

STAR ODK/NextGenSoftware.OASIS.STAR.WebAPI/Properties/launchSettings.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"commandName": "Project",
66
"dotnetRunMessages": true,
77
"launchBrowser": false,
8-
"applicationUrl": "http://localhost:50564",
8+
"applicationUrl": "http://localhost:8888",
99
"environmentVariables": {
1010
"ASPNETCORE_ENVIRONMENT": "Development"
1111
}
1212
},
1313
"https": {
14-
"commandName": "Project",
15-
"dotnetRunMessages": true,
16-
"launchBrowser": false,
17-
"applicationUrl": "https://localhost:7154;http://localhost:50564",
18-
"environmentVariables": {
19-
"ASPNETCORE_ENVIRONMENT": "Development"
20-
}
14+
"commandName": "Project",
15+
"dotnetRunMessages": true,
16+
"launchBrowser": false,
17+
"applicationUrl": "https://localhost:8888;http://localhost:50564",
18+
"environmentVariables": {
19+
"ASPNETCORE_ENVIRONMENT": "Development"
20+
}
2121
}
2222
}
2323
}

Scripts/.local_api_processes.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
{
2-
"startedAtUtc": "2026-04-03T00:03:39.1952155Z",
3-
"web4Url": "http://localhost:7777",
4-
"web5Url": "http://localhost:8888",
5-
"processes": [
6-
{
7-
"pid": 48873,
8-
"name": "WEB4_OASIS_API",
9-
"project": "/home/dellams/Source/OASIS/Scripts/../ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/NextGenSoftware.OASIS.API.ONODE.WebAPI.csproj"
10-
},
11-
{
12-
"pid": 51142,
13-
"name": "WEB5_STAR_API",
14-
"project": "/home/dellams/Source/OASIS/Scripts/../STAR ODK/NextGenSoftware.OASIS.STAR.WebAPI/NextGenSoftware.OASIS.STAR.WebAPI.csproj"
15-
}
16-
]
1+
{
2+
"startedAtUtc": "2026-04-04T08:58:23.3852965Z",
3+
"web4Url": "http://localhost:7777",
4+
"web5Url": "http://localhost:8888",
5+
"processes": [
6+
{
7+
"pid": 7296,
8+
"name": "WEB4_OASIS_API",
9+
"project": "C:\\Source\\OASIS-master\\Scripts\\..\\ONODE\\NextGenSoftware.OASIS.API.ONODE.WebAPI\\NextGenSoftware.OASIS.API.ONODE.WebAPI.csproj"
10+
},
11+
{
12+
"pid": 5944,
13+
"name": "WEB5_STAR_API",
14+
"project": "C:\\Source\\OASIS-master\\Scripts\\..\\STAR ODK\\NextGenSoftware.OASIS.STAR.WebAPI\\NextGenSoftware.OASIS.STAR.WebAPI.csproj"
15+
}
16+
]
1717
}

0 commit comments

Comments
 (0)