Fix NormalizeQuery
This commit is contained in:
parent
7cb1d7a5b6
commit
bb1f4e6e27
2 changed files with 2 additions and 1 deletions
|
@ -66,7 +66,7 @@ public class UserResolver(ILogger<UserResolver> logger, UserService userSvc, Dat
|
||||||
return (finalAcct, finalUri);
|
return (finalAcct, finalUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string NormalizeQuery(string query) => query.StartsWith("acct:") ? query[5..] : query;
|
private static string NormalizeQuery(string query) => query.StartsWith('@') ? $"acct:{query[1..]}" : query;
|
||||||
|
|
||||||
public async Task<User> Resolve(string query) {
|
public async Task<User> Resolve(string query) {
|
||||||
query = NormalizeQuery(query);
|
query = NormalizeQuery(query);
|
||||||
|
|
|
@ -30,6 +30,7 @@ builder.Services.AddViteServices(options => {
|
||||||
options.Server.AutoRun = false; //TODO: Fix script generation on macOS
|
options.Server.AutoRun = false; //TODO: Fix script generation on macOS
|
||||||
options.Server.UseFullDevUrl = true;
|
options.Server.UseFullDevUrl = true;
|
||||||
});
|
});
|
||||||
|
//TODO: single line only if there's no \n in the log msg (otherwise stacktraces don't work)
|
||||||
builder.Services.AddLogging(logging => logging.AddSimpleConsole(options => { options.SingleLine = true; }));
|
builder.Services.AddLogging(logging => logging.AddSimpleConsole(options => { options.SingleLine = true; }));
|
||||||
builder.Services.AddDbContext<DatabaseContext>();
|
builder.Services.AddDbContext<DatabaseContext>();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue